<?php
session_start();
require_once('AppInfo.php');
require_once('utils.php');
require_once('sdk/src/facebook.php');
$facebook = new Facebook(array(
'appId' => 'APP_ID',
'secret' => 'APP_SECRET',
));
$app_token="XXXXXX"; //long life access_token should be better
$attachment = array
(
"access_token"=>"$app_token",
"message" => "Interesting App",
"name" => "MyApp",
"caption" => "About MyApp",
"link" => "http://facebook.com/", //your own url
"description" => "Awesome App",
"scope" => "publish_stream"
);
$result = $facebook->api("/USER_ID/feed","POST",$attachment);
print_r($result );
?>
I love tennis and programming. I am not genius, so I collect the knowledge piece by piece.
Thursday, April 4, 2013
post on user's timeline by app
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment