function PostOnFriendsWall()
{
var access_token=document.getElementById("access_token").value;
var sendername=document.getElementById("sendername").value;
status1 = document.getElementById('message').value;
var facebookid = document.getElementsByName("facebookid");
FB.api(
{
method: 'stream.publish',
message: status1,
target_id: facebookid,
access_token:access_token,
attachment: {
name: ''Your Message Here by'+sendername+' via Javascript Sdk.',
caption: 'Your Caption Here',
description: ('Your Discription Here'),
href: 'Your URL Here where you want to redirect after click',
media: [
{
type: 'image',
href: 'Your URL Here where you want to redirect after click',
src: 'Your Website Image Url if you want to display your logo on Friend's Wall otherwise it'
}
]
},
action_links:
[
{ text: 'Givora', href: 'Your URL Here where you want to redirect after click' }
]
},
function(response) {
if (response == 0){
alert("Error");
}
else
{
alert("Wall Posted successfully");
}
}
);
}
{
var access_token=document.getElementById("access_token").value;
var sendername=document.getElementById("sendername").value;
status1 = document.getElementById('message').value;
var facebookid = document.getElementsByName("facebookid");
FB.api(
{
method: 'stream.publish',
message: status1,
target_id: facebookid,
access_token:access_token,
attachment: {
name: ''Your Message Here by'+sendername+' via Javascript Sdk.',
caption: 'Your Caption Here',
description: ('Your Discription Here'),
href: 'Your URL Here where you want to redirect after click',
media: [
{
type: 'image',
href: 'Your URL Here where you want to redirect after click',
src: 'Your Website Image Url if you want to display your logo on Friend's Wall otherwise it'
}
]
},
action_links:
[
{ text: 'Givora', href: 'Your URL Here where you want to redirect after click' }
]
},
function(response) {
if (response == 0){
alert("Error");
}
else
{
alert("Wall Posted successfully");
}
}
);
}
No comments:
Post a Comment