Hi i am using this code to send the feed to specific user by providing id in $gg_fbid.
is there any way to send the feed via Facebook application and access token to all the users using Facebook Application in PHP SDK.
yes thats what i want, is that possible or should i make a separate database to store their id
require_once("fb/facebook.php");
$gg_fbid='100004012849319';
$facebook = new Facebook(array(
'appId' => 'xxxxxxxxxxxxxxxxxx',
'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxx',
));
$attachment = array
(
'access_token'=>$facebook->getAccessToken(),
'message' => 'This Page is awesome.',
'name' => 'Must Like It',
'caption' => 'Dailyjokes',
'link' => 'http://facebook.com/wtfdailyjokes/',
'description' => 'Awesome Picture',
'picture' => 'https://www.facebook.com/photo.php?fbid=264680606974256&set=a.206648236110827.41772.206637039445280&type=1&relevant_count=1'
);
$result = $facebook->api($gg_fbid.'/feed/','post',$attachment);
There is no way to directly post to wall of Users Using Facebook Application About any Event or something, Thats Why answering my own Question. Facebook permission publish_stream is necessary for this to work. /
You need to create a Database of users when they use your Application like in my Code
SO posting my original Code to tell you in Detail.
This is code when person first opens your application, this $args gets posted to user wall and the id and username is stored to the Database.
SO in the future if anything you want to post to users wall who are using your application and also granted the permission.You can do like promoting website or Facebook Fan Page.
Last how this really happened. As Mr Martin is saying we will need 10 access token for 10 users but thats not correct if your are posting from application than Application token is used to post on all users wall at a time , So with a single access token of Application you can post to million users if your apps has that. SO how to get that access token of application using this link
After that fetch all ids in array and execute the same code to post on all users wall using for loop or anyway still i give my code which i used.