Reputation: 271
does anyone knows what's wrong with the below code that I have?
I just couldn't seem to be able to get the name, caption, description and image shown on the Facebook user's news feed but the link and message show up and they worked.
WebClient wc= new WebClient();
wc.Encoding = Encoding.UTF8;
wc.UploadString("https://graph.facebook.com/me/links", null, "access_token=" + <facebookAccessToken> + "&link=" + <a valid url> + "&message=" + <a valid message> + "&name=SomeName" + "&caption=SomeCaption" + "&description=SomeDescription" +"&picture=http://mywebsite.com/photo.jpg");
Is there another way to do it (post a Link to the News Feed of Facebook) in ASP.NET code-behind?
Upvotes: 2
Views: 5803
Reputation: 1222
This appears to be an issue with the Facebook Graph API. I have filed a bug here and would appreciate any support from fellow SO'ers that come across this:
https://developers.facebook.com/bugs/194522957295380
Upvotes: 2
Reputation: 36
Even though the graph api specifies that https://graph.facebook.com/me/links accepts name, description and picture as parameters, these parameters do nothing. There is a bug filed (http://bugs.developers.facebook.net/show_bug.cgi?id=14782, you will need to sign up or login to view the page) to fix this issue.
You can also post links using https://graph.facebook.com/me/feed and passing the same parameters. Doing this yields the behavior you expected with the links method.
Upvotes: 2
Reputation: 38442
see how does one post a thumbnail picture to a Facebook /links object?. posting a link to /links will not allow you to specify a picture, but posting to /feed will.
Upvotes: 0