0

Hi all,

I have to create a function, that lets users write a newsletter from an intranet, instantly share that on the companys Facebook page wall.

The intranet stuff is made, and all fine - just need to post it on the wall too..

Anyone knows what api or plugin I need for that, anyone?

Best regards, Klemme

2
Contributors
5
Replies
31
Views
4 Years
Discussion Span
Last Post by klemme
0

Thanks

I have one question about it..

Do I need exactly the mentioned options in the curl requestt? Or can i remove one or more, just to make the code as short as possible (which I allways try to..) and still do the job just fine?

//Facebook Wall Update
params = array('access_token'=>$facebook_access_token, 'message'=>$status);
$url = "https://graph.facebook.com/$facebook_id/feed";
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $url,
CURLOPT_POSTFIELDS => $params,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_VERBOSE => true
));
$result = curl_exec($ch);
// End

Best regards and thank you very much!

/Klemme

Edited by klemme

0

I have been playing around with it, and I keep getting this error whenever I try to run the curl script for testing:

{"error":{"message":"(#200) The user hasn't authorized the application to perform this 
     action","type":"OAuthException","code":200}}

I have set the following :

 $facebook_id = 'id of my facebook PAGE';
 $facebook_access_token = 'A very long mixed string..';

I tjecked in the graph api explorer, but cant seem to hit it off right, any ideas how I can publish to my Facebook PAGE wall, using curl?

Also the user shouldnt be logged in to facebook to publish, I just need to push the news into the feed.

I can see in the Access Token Debugger, that the access token had expired an hour ago, even though I just thought i had set it..

Could I be guided to a solution here perhaps?

Best, Klemme

Edited by klemme

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.