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 "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. :(
Related
It seems like the only way I can add a fan page "like" button is to use UIWebView.
I personally don't like this method and I'd much prefer to be able to like the page via the Graph API, similarly to what explained here: https://developers.facebook.com/docs/howtos/publish-to-feed-ios-sdk/
In this question
the last answer by ToddH was that it's possible to "like" a fan page via the Graph API. According to Stan's answer however, it seems like you can't like a fan page via the Graph API, as it's against Facebook's platform policies, but you can like via Open graph (which I haven't used yet).
In short: Can I use Graph API to like a fan page? If not is my only option is to use UIWebView (as explained in Ray's tutorial), or I have a new option to use Facebook's Open graph? (please elaborate on this option if it's legit)
EDIT: the short answer is no, you can't use Graph API/Open Graph to like a fan page. See my answer below.
Also I want to add that I don't understand why it was so important to down vote this question.
As Igy, who works at Facebook, wrote in the comments above, there is no way to do it directly via Graph API nor via Open Graph.
In my project I have added a button when clicked navigates to the facebook fan page via UIWebView and from there the user can Like the page.
The company I'm currently working for wants to create a button that lets people share their order on Facebook after they've paid, but with the deprecation of the "Share" button I don't really know how to do it.
The "Like" button does not seem fit for this. Any ideas, anyone?
There are a few ways to go about this.
You can use the standard sharer. This is good for one-off sharing or in cases where you don't have control or don't want to control how the share is rendered and you want Facebook to handle it.
http://www.facebook.com/sharer.php?u=<url to share>&t=<title of content>
It won't require you to have an app ID but you also won't get a nice control panel for your applications sharing history/insights. You can query and get some information about the URL your sharing though by looking through the open graph.
I.E
https://graph.facebook.com/?ids=http%3A%2F%2Fwww.cnn.com
https://graph.facebook.com/comments/?ids=http%3A%2F%2Fwww.cnn.com
You can set the URL and Title of the content. The sharer will then look at the metadata on the webpage your sharing to determine the contents of the share. More below.
You can also use the Feed dialog. Which comes with more customization options. The Feed dialog is the best option if your integrating sharing as an integral part of the application. I think at minimum you need to include the app_id,redirect_uri and link property. Look through the properties here. You will need an app ID to use this feed dialog and if your using the JS api you need to authenticate the user too. You can also invoke the dialog directly through a direct url where you don't need to pre-authenticate the user.
With either sharing method, you may wish to include custom open graph metatags on your webpage. This way you can influence how the Facebook scraper makes your share. You can set some default (pre-accepted by Facebook) open graph metatags on your page. Or you can create your own set now in the dashboard. In the Open Graph dashboard on Facebook you can customize how Facebook is supposed to read and interact with your metatags.
You can debug your pages open graph metatags by passing your URL through the debugger.
I.E
http://developers.facebook.com/tools/debug/og/object?q=www.cnn.com
This will give you, for example, JSON or an HTML representation of how FB sees the page.
Basicly I want to do the same what Facebook API does but without the API. Any ideas?
If all you want s to add a facebook like button to your website, then you can use the "like button generator" here http://developers.facebook.com/docs/reference/plugins/like/
Use the "get code" button at the bottom.
If you need to like different pages, then it's easy to grab the code (as per above) and just programmatically substitute in your URL for the one you put in the code above.
If you need anything more than this, you will need to provide us more information. Starting with what language you use, what you've already tried and what form you'd like the "LIKE URL" to be in when you're done.
I am developing an iPhone application that lists videos posted on logged-in user's wall. I would like to provide an Like button below each video listed. When the user clicks on this Like button, the corresponding video should be liked in Facebook.
The Like button shown in the UI should match the UI theme of my app. I have gone through Facebook plug-in documentation related to Like button. Following is the link with the documentation:
http://developers.facebook.com/docs/reference/plugins/like/
But, I cannot use this Like button generated using iFrame since I will not be able to customize the look of Like button.
How can I customize my Like button? Or how can I programmatically like a Video URL? I am trying to this since long time. I have seen some iPhone apps already having custom Like button.
Take a look here for a nice how-to on styling:
http://www.esrun.co.uk/blog/disguising-a-facebook-like-link/
And the specific policy from Facebook is that as long as you are not deceiving the user, the policy team would consider this practice acceptable.
I could do it using Graph API. New SDK provides support for Graph API.
Is there a way to embed a Facebook page wall into a website? Without using Graph API?
I want to have the wall exactly as styled from Facebook, with all actions to Like, Comment and Share but from my website.
I'm sorry but there is no way to easy reproduce your wall on your website. You can easily get contents (but it will not reflect the facebook's wall as some content is filtered), using facebook's javascript sdk or graph api, but you won't be able to add universal like button using javascript sdk for every posts, as facebook requires to like some objects (like pages) directly with their like social plugin.
You can check a lot of facebook widgets you can easily implement on your website using Javascript SDK on the fbrell application.
Happy facebook programming!
Based on these requirements, would an iframe produce the desired effect? Maybe even a regular frame? (I haven't used those in a long time, so I don't remember if there's some restriction that would prevent loading external content with them).
When you say you want these actions "from your website" what exactly do you mean? Do you just want to wrap the Facebook content with your own (in a frame) or do you want to actually do something locally with these actions, intercepting them somehow?
You will need to use FBML. or custom code from for using Graph API, i dont think you can do it any other way. look up facebook documentaion for details.
There is no way you can embed the same wall, yet you can use paste your wall's contents on your webpage,
If you want Share, Like and comment button to perform action on your webstie then you have to create your own db and user management
But...
Share, Like and Comment buttons which will effect your original wall in facebook is not possible.
double think. I have been working on a Wall Feed for Pages for some time now, what you are looking for can be done, but you would need to use the Graph API to accomplish..
Sample Here http://shawnsspace.com/plugins/wallfeed.php Likes, Commenting is disabled.
Emulates the Wall for http://facebook.com
I used a combination of Graph API "PHP-SDK 3.1.1", "Javascript SDK". This can be done with pure client side Javascript though.