私は夢中になっていて、ユーザーが友人を選択して通知を送信したり、アプリケーションからウォールに投稿したりできるアプリケーション用のスクリプトを作成する方法を理解できません。
フラッシュゲームをプレイするように挑戦されたことを友人に通知する必要があるだけです。リンク付きの簡単なテキストだけです。派手なものは必要ありません:D
ここに私が試したものがありますが、うまくいきません:(理由はわかりません。
$message = 'Watch this video!';
$attachment = array( 'name' => 'ninja cat', 'href' => 'http://www.youtube.com/watch?v=muLIPWjks_M', 'caption' => '{*actor*} uploaded a video to www.youtube.com', 'description' => 'a sneaky cat', 'properties' => array('category' => array( 'text' => 'pets', 'href' => 'http://www.youtube.com/browse?s=mp&t=t&c=15'), 'ratings' => '5 stars'), 'media' => array(array('type' => 'flash', 'swfsrc' => 'http://www.youtube.com/v/fzzjgBAaWZw&hl=en&fs=1', 'imgsrc' => 'http://img.youtube.com/vi/muLIPWjks_M/default.jpg?h=100&w=200&sigh=__wsYqEz4uZUOvBIb8g-wljxpfc3Q=', 'width' => '100', 'height' => '80', 'expanded_width' => '160', 'expanded_height' => '120')));
$action_links = array( array('text' => 'Upload a video', 'href' => 'http://www.youtube.com/my_videos_upload'));
$target_id = $user;
$facebook->api_client->stream_publish($message, $attachment, $action_links, $target_id);
更新: appinclude.php
$facebook->redirect('https://graph.facebook.com/oauth/authorize?client_id=132611566776827&redirect_uri=https://apps.facebook.com/gamesorbiter/&scope=publish_stream');
私が得るエラー:
{
"error": {
"type": "OAuthException",
"message": "Invalid redirect_uri: The Facebook Connect cross-domain receiver URL (https://apps.facebook.com/gamesorbiter/) must be in the same domain or be in a subdomain of an application's base domain (gamesorbiter.com). You can configure the base domain in the application's settings."
}
}
余分な「s」(http) がないと、次のエラーが発生します。
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
例を投稿できればお願いします。また、それを行うには拡張許可が必要ですか、それともユーザーがメッセージを送信した場合、それは必要ありませんか?
ありがとうございました