0
アプリケーション経由でFacebookのページにリンクをどのように共有するのですか?アプリケーション経由でfacebookで管理者としてsharelinkする方法は?
例:あなたのためにこれを行う作業は約2時間を過ごした like tihs
アプリケーション経由でFacebookのページにリンクをどのように共有するのですか?アプリケーション経由でfacebookで管理者としてsharelinkする方法は?
例:あなたのためにこれを行う作業は約2時間を過ごした like tihs
。うれしいです;)
require_once("facebook.php");
$facebook = new Facebook(array(
'appId' => 'YOUR APP ID',
'secret' => 'YOUR APP SECRET',
));
$pageID = 123456789; //YOUR PAGE ID HERE
$user_id = $facebook->getUser();
if($user_id != false && $user_id != 0) {
//user is logged in.
$response = $facebook->api('me/accounts');
foreach ($response['data'] as $key => $val) {
if ($val['id'] == $pageID) {
$page_access_token = $val['access_token'];
//Below is the API Call for the posting to the page's wall.
$api = $facebook->api('me/feed', 'POST', array('message' => 'LOLs', 'access_token' => $page_access_token));
}
}
}
else {
//if user is not logged in, make them log in.
header('location:' . $facebook->getLoginURL(array('scope' => 'publish_stream, manage_pages')));
}
ソリッドエフォートハハ –
authダイアログでmanage_pages権限を使用する必要があります。 – nickw444
私はコード(PHP) –
あなたのコードが提供されて欲しいです。 – nickw444