I have almost wasted my whole day in searching why is it not posting on friends wall
please help
I do not get any errors but the post doesnt seem to be appearing on friends wall.
i get a dialog box saying to post on friends wall.. when i confirm by clicking share it gets closed but no changes on friends wall
I tried on many different friends wall to check for any privacy policy but i dont think thats the matter of concern here.
if i dont specify "to" paramter it gets posted on my profile but only problem is with friends wall
code is as follows
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.1.js">
</script>
<script src="http://connect.facebook.net/en US/all.js">
</script>
<script type="text/javascript">
window.fbAsyncInit = function()
{
FB.init
(
{
appId : 'appid',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true , // parse XFBML
oauth : true // Enable oauth authentication
}
);
};
$(document).ready(function ()
{
$('#shareonfacebook').click(function (e)
{
e.preventDefault();
var obj=
{
method: 'feed',
name: 'DvimayPostPhoto',
link: 'http://localhost/FaceBook/index.html',
picture: 'http://www.fbrell.com/public/f8.jpg',
caption: 'hey how is my Application ? tell me dude',
description: 'hey how is my Application ?',
to: 'frnd id',
message: ''
};
function callback(response)
{
document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
}
FB.ui(obj, callback);
});
}
);
</script>
<script>
FB.init({appId : 'app id'});
</script>
</head>
<body>
<div id="fb-root"></div>
<script>
(function()
{
var e = document.createElement('script');
e.src = document.location.protocol +'//connect.facebook.net/en_US/all.js';
e.sync= true;
document.getElementById('fb-root').appendChild(e);
}
);
</script>
<script src="C:/Users/Dvimay/Desktop/HIGHCHARTS/js/highcharts.js"></script>
<script src="C:/Users/Dvimay/Desktop/HIGHCHARTS/js/modules/exporting.js"></script>
<div id="container" style="height: 400px;width:500px;"></div>
<input type="button" id="shareonfacebook" value="Share This Link on Facebook"></input>
</html>
What response did you get from FB.ui()? Looking at the code, it seems to be ok. The only possible scenario I could imagine is, your friend has disabled the permission to post on his/her wall. Did you try with any other friend id?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.