Reputation: 2070
I am trying to implement a simple android app with forms inside it. I want to implement a simple like button inside the app so that when the user clicks the like button I want him to be redirected to one of the Facebook Fan pages.
Do i have to use the Facebook android SDK for this I prefer browser opening, or any out of application activity instead of Android WebView. I tried to implement the a simple FB like button, but when the user clicks the button he is directed to the mobile browser and a blank pages is displayed!!!
After doing some research I came to know that using android-facebook-sdk is the only option, correct me if I am wrong.
Upvotes: 2
Views: 1212
Reputation: 46846
I use this:
String myUrl = "http://www.facebook.com/pages/TweetSomeShit/176723425699023";
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(myUrl)) ;
startActivity(i);
It will open up browser and point to whichever page you want. The Like button is prominently displayed on the page. If you mean to automatically "Like" the page without the user clicking the like button on the web page then I think there is no way to do this outside the facebook SDK but I do not know for sure.
Upvotes: 1