Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- // Include facebook class (make sure your path is correct)
- require_once("path/to/facebooksdk/src/facebook.php");
- // Create our Application instance (replace this with your appId and secret).
- $facebook = new Facebook(array(
- 'appId' => 'app_id',
- 'secret' => 'app_secret',
- 'cookie' => true,
- ));
- //$token is the access token from the URL above
- $post = array('access_token' => $token, 'message' =>'any message','name' => 'name','description'=> 'description','picture' => imageurl,'link'=>'http://yourlink','caption' =>'caption');
- try{
- $res = $this->tasks->api('/me/feed','POST',$post);
- } catch (Exception $e){
- echo $e->getMessage();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement