나는 미친 듯이 갔고 사용자가 친구를 선택하고 내 응용 프로그램에서 자신의 벽에 알림 또는 게시물을 보낼 수 있도록 내 응용 프로그램에 대한 스크립트를 만드는 방법을 알아낼 수 없습니다.친구에게 보내기 또는 게시하기 벽에
나는 단지 그들이 플래시 게임, 링크가 단순한 텍스트를 재생하기 위해 도전 한 것을 자신의 친구에게 통지 할 필요가, 나는 공상 아무것도 필요 없어요 : 여기
내가 뭘하려하고 그것을 나던 작업 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);
UPDATE :. appinclude.php
$facebook->redirect('https://graph.facebook.com/oauth/authorize?client_id=132611566776827&redirect_uri=https://apps.facebook.com/gamesorbiter/&scope=publish_stream');
ERR 또는 내가 얻을 : 여분의 "S"없이
{
"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."
}
}
(HTTP)를 내가이 오류 :
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
당신이 예를 게시 할 수 주시기 바랍니다. 또한 확장 된 권한이 필요합니까? 그렇지 않은 경우 사용자가 메시지를 보내면 필요하지 않습니까?
당신은
내 appinclude.php에이 코드가 있습니다. [코드] $ facebook = new Facebook ($ appapikey, $ appsecret); $ user = $ facebook-> require_login ($ required_permissions = 'publish_stream'); [/ code] 그러나 내 프로필에서 응용 프로그램을 제거하고 다시 액세스 할 때 동일한 이전 기본 사용 권한 대화 상자가 표시됩니다. 왜 앱이 publish_stream 권한을 요청하지 않습니까? – Krasi
@Krasi : 원하는 사용 권한을 얻으려면이 부분을 참조하십시오. http://developers.facebook.com/docs/authentication/ – Sarfraz
아, 신청서에 대한 연장 된 허가서를 신청했는데 잘하면 페이스 북에서 신청서를 승인합니다. 사용자가 내 앱을 통해 다른 사용자에게 메시지를 보내고 기본적으로 권한 문제를 해결할 수있는 방법은 없습니다. – Krasi