To find users facebook id’s, post feed dialog to my wall and friends wall

  • Post a feed dialog to friends wall :

After logon to fb then go to timeline copy the url and paste the url to below site we can get users (friend) pageid

http://www.findmyfacebookid.com/

———————————————————————————————————————————

  • Post a feed dialog to my wall using php:

Ref site : http://25labs.com/  (but it doesnt post a feed, we can get friends list, likes, groups and etc)

$app_id = “get it from fb”;
$app_secret = “get it from fb”;
//$site_url = “http://www.demo-infoquestit.com/”;
$site_url = “http://www.demo-infoquestit.com/test/facebook_3/”;

$user = $facebook->getUser();

if($user)
{

$attachment = array
(
‘access_token’=>$facebook->getAccessToken(),
‘message’ => ‘–Facebook comments on friends wall–‘,
‘name’ => ‘kasirajan’,
‘caption’ => ‘doodle click testing’,
//’link’ => ‘http://facebook.com/wtfdailyjokes/’,
‘link’ => ‘http://www.infoquestit.com/images/infoquest-logo.png’,
‘description’ => ‘infoquest it solutions’
//’picture’ => ‘http://www.doodleclick.com/upload/products/thumb/5602591_SIDE0.png’
);
$result = $facebook->api(‘me/feed/’,’post’,$attachment);
}

}

——————————————————————————————————–

  • Post a feed to friends wall using javascript :

<html xmlns=”http://www.w3.org/1999/xhtml&#8221;
xmlns:fb=”https://www.facebook.com/2008/fbml”&gt;
<head>
<title>My Feed Dialog Page</title>
</head>
<body>
<div id=’fb-root’></div>
<script src=’http://connect.facebook.net/en_US/all.js’></script&gt;
<p><a onclick=’postToFeed(); return false;’>Post to Feed</a></p>
<p id=’msg’></p>

<script>
FB.init({appId: “get it from fb”, status: true, cookie: true});

function postToFeed() {

// calling the API …
var obj = {
method: ‘feed’,
redirect_uri: ‘http://www.demo-infoquestit.com/test/facebook_wall/&#8217;,
link: ‘https://www.facebook.com/sri.kasirajan/&#8217;,
picture: ‘https://www.facebook.com/sri.kasirajan/picture&#8217;,
name: ‘Facebook Dialogs’,
caption: ‘Reference Documentation’,
description: ‘Using Dialogs to interact with users.’,
to : ‘100003944364172’ // friend page id
};

function callback(response) {
document.getElementById(‘msg’).innerHTML = “Post ID: ” + response[‘post_id’];
}

FB.ui(obj, callback);

}
</script>
</body>
</html>

————————————————————————————————————————-

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s