How to post a link with a picture to Facebook using the Graph API?

I have tried two different methods.

The first is to specify the link in the /PROFILE_ID/feed link argument (as described under "publishing" here). The problem is that if I specify anything other than my application URL i get an error saying the URL is invalid.

The second is to use the /PROFILE_ID/links method and specifying a picture URL. The problem is that when it posts it only shows the message and the URL. I've specified values for picture, name and message but none of them show.

How can I Post a link, with a name, message and picture?


Your first approach is the correct one. Is your url starting with http://? What SDK are you using?

As described on this page, the example suggest it should work.

curl -F 'access_token=...' \
 -F 'message=Check out this funny article' \
 -F 'link=' \
 -F 'picture=' \
 -F 'name=Article Title' \
 -F 'caption=Caption for the link' \
 -F 'description=Longer description of the link' \
 -F 'actions={"name": "View on Zombo", "link": ""}' \
 -F 'privacy={"value": "ALL_FRIENDS"}' \
 -F 'targeting= {"countries":"US","regions":"6,53","locales":"6"}' \

Need Your Help

DotNet.Highcharts and proper JSON

json highcharts dotnethighcharts

I have an inconsistent issue with the JSON sent to highcharts. Highcharts does not always reject the JSON, but when it does, updating the JSON by hand to a proper format consistently fixes it:

Maven Compilation error: cannot find symbol with local dependecies

maven intellij-idea dependencies

When I run "mvn compile" on my Maven project, I get error messages like the following:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.