开发者

Create a Facebook "Like" programmatically?

I'd like to replicate the "Like" button functionality in an iPhone application using a native widget. The URL associated with the Like would be a product page with details on the manufacturer's website. Unfortunately, Facebook's Like Button [1] only supports the iframe version. Is there any way to have a user开发者_JAVA百科 "Like" a URL without using the Like Button?

[1] http://developers.facebook.com/docs/reference/plugins/like/


There's no API to actually create a Like connection.


Looking at the Facebook Developer info, it appears it is possible to Like an Open Graph Object if it already exists in the Open Graph database. Look for the "/OBJECT_ID/likes" method under the "Publishing" section of the API Reference. It says you can "Like the given object (if it has a /likes connection)".

But I do not believe Facebook provides the ability to create NEW Open Graph objects (for, say, a webpage) programmatically. If anyone knows how to do this, I would be interested to hear about it.

There looks to be an assigned bug about not bing able to create new Graph Objects via the API: http://bugs.developers.facebook.net/show_bug.cgi?id=10714

We want to have our own "Like" system with an additional "Dislike" option, and if the user "Likes" something with our system we want to create a Facebook Like in the background. It seems we will need to pre-Like all of the objects (thousands of pages!) so this won't work for us. :(

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜