Vote count:
0
Facebook Login URL Code :
$this->set("facebookUrl",$this->facebook->getLoginUrl(
array(
'scope' => 'email,publish_actions',
'redirect_uri' =>"http://redirected_url"
'display'=>"popup"
)
));
Post story on facebook code :
$params = array(
"access_token" => "access_token_of_logged_in_user",
"message" => "Testing facebook post",
"picture" => "http://ift.tt/1xH72tA",
"caption" => "www.pontikis.net",
"description" => "Description of post."
);
$myProfile = $this->facebook->api('/me');
$permissions = $this->facebook->api('/me/permissions');
pr($permissions);
try {
$ret = $this->facebook->api('/'.$myProfile['id'].'/feed', 'POST', $params);
echo 'Successfully posted to Facebook';
}
catch(Exception $e) {
echo $e->getMessage();
}
Permission Displayed here :
Array
(
[data] => Array
(
[0] => Array
(
[permission] => public_profile
[status] => granted
)
[1] => Array
(
[permission] => email
[status] => granted
)
)
)
I got following Error when I post on facebook :
(#200) The user hasn't authorized the application to perform this action
asked 3 mins ago
Error:#200 The user hasn't authorized the application to perform this action
Aucun commentaire:
Enregistrer un commentaire