Hey guys, I have a little problem and I don't know how can I fix it. I have this function:
public function postOnUserWall($message, $linkTitle=false, $link=false, $description=false, $picture=false) {
$attachment = array(
'message' => $message
);
if ($linkTitle != false) {
$attachment['name'] = $linkTitle;
}
if ($link != false) {
$attachment['link'] = $link;
}
if ($description != false) {
$attachment['description'] = $description;
}
if ($picture != false) {
$attachment['picture'] = $picture;
}
try {
$publishStream = $this->facebook->api("/" . $this->user . "/feed", 'post', $attachment);
//as $_GET['publish'] is set so remove it by redirecting user to the cbase url
} catch (FacebookApiException $e) {
d($e);
}
}
I am using Facebook PHP SDK 3.0.
check and make sure the no redirect is done when user accesses that page / function. some people get this problem becuase after they do the publishing, they check for certain conditions and then do a redirection again (so as to handle the authentication)
I had the same problem when i tried to post on a application fanpage. I think the problem is NOT with the programing. I solved the problem by editing the permissions of the applikation fanpage and auth dialog of the application.
->
Default Activity Privacy:None->
-->
no-->
yes-->
yes/noHope this helps:-)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.