Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I allow users to "Like" our Facebook company profile using the Facebook SDK for iOS?

We have a company profile page on Facebook where we interact with our customers. We would like to get as many users to "Like" us as possible, because it allows us to post something and have have it appear in their feeds.

How do I allow users to "Like" our Facebook company profile using the Facebook SDK for iOS? We have been able to login/logout and post on other people's walls just fine, but how do we get people to "Like" us using the iOS SDK?

like image 799
Ethan Allen Avatar asked Feb 10 '11 22:02

Ethan Allen


People also ask

What is Facebook SDK used for?

The Facebook SDK is a set of software components that developers can include in their mobile app to understand how people use the app, run optimized marketing campaigns and enable Facebook login and social sharing.

On which platform does the Facebook SDK works on?

To learn more about using Facebook development tools, see App Development. The current version of the Facebook SDK for Android is version 15.0. 0 and requires the Android API 15. Code and samples for the Facebook SDK for Android are available on GitHub.

Is Facebook SDK free?

The Graph API is free to use, for all applicable use cases.

What is Facebook API?

What is the Facebook API? The Facebook Graph API is an HTTP-based API that allows developers to extract data and functionality from the Facebook platform. Applications can use this API to programmatically query data, post in pages and groups, and manage ads, among other tasks.


1 Answers

I'm fairly certain this is possible, it will just involve finding the right information in the Facebook Graph API documentation (which is often tricky): http://developers.facebook.com/docs/api

The relevant section on that page would be under "Publishing" where it says

You can publish to the Facebook graph by issuing HTTP POST requests to the appropriate connection URLs, using an user access token ... You can "like" a post by POSTing to https://graph.facebook.com/POST_ID/likes

Where obviously POST_ID should be replaced by the ID of your Facebook page. I don't think this is in the Facebook SDK for iOS but there is definitely code in there for making POST requests to the Graph API, so it would involve digging around in there for a bit. Hope this helps!

like image 134
neilkimmett Avatar answered Sep 23 '22 17:09

neilkimmett