1

i want to like a facebook page in my android app..is there any API for this?i tried a code.it was working intially.but now it is not working

likeWebView = (WebView) findViewById( R.id.webView1 );
likeWebView.getSettings().setJavaScriptEnabled(true);
String url = "http://www.facebook.com/plugins/like.php?" +
       "href=" + URLEncoder.encode("likeurl" ) + "&" +
       "layout=standard&" +
       "show_faces=false&" +
       "width=500&" +
       "action=like&" +
       "colorscheme=light&" +
       "access_token=" + URLEncoder.encode( "read_stream" );
likeWebView.loadUrl( url );

please help me.I have been working on this for a long time.

Mudassir
  • 13,031
  • 8
  • 59
  • 87
julika Zen
  • 357
  • 6
  • 22
  • 1
    Please have a look at this link [here][1] and [here][2]. Hope it helps you. [1]: http://stackoverflow.com/questions/5285574/is-it-possible-to-like-a-fan-page-using-the-facebook-sdk [2]: http://stackoverflow.com/questions/4076604/android-facebook-sdk-how-to-do-a-like – Hadi Jan 16 '12 at 05:15
  • What does it means, `now it is not working`..? Is there any exception report in LogCat, please post it. – Mudassir Jan 16 '12 at 05:16
  • Use android-sdk-facebook API. – Siten Jan 16 '12 at 05:23
  • @Hadi thanks a lot.i reffered these links.but i dont want to load it using startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url))); – julika Zen Jan 16 '12 at 05:29
  • @mudassir no exception is showing in logcat.but when u click the like button,login page contains sign up for experiencing this social plugin.earlier it was showing fan page name. – julika Zen Jan 16 '12 at 05:33

1 Answers1

0

First of all u have to create facebook developer forum account. then download facebook API which ill include in your project. You can customized the facebook API according your requirement.

This url can help you http://forum.developers.facebook.net :)