0

Possible Duplicate:
Like button in iOS application

I want to create a Facebook like button ,on clicking that button i want to implement 'like' Facebook page feature in my app in iPhone.

Community
  • 1
  • 1
megha
  • 905
  • 7
  • 17
  • You can't. The only way to like a page (or what ever) is through the 'like' button facebook provides – basvk Nov 08 '12 at 07:58
  • check my answer, you will get the like button of that particular page, wherever you need in your app, there is no any API to get "like button" ! – DD_ Nov 08 '12 at 08:34

1 Answers1

1

the latest method to get facebook like button is given below,

NSString *urlString=[NSString stringWithFormat:@"http://www.facebook.com/plugins/like.php?href=%@&send=false&layout=button_count&width=90&show_faces=false&action=like&colorscheme=light&font=arial&height=21",self.href];

//store the page link that you need to like in href

NSURLRequest *fbLikeURLRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:urlString]];
[_webView loadRequest:fbLikeURLRequest];

Use this web view where you need to get like button !

reger developers.facebook.com if you need to know more

Regards

Deepak

DD_
  • 7,230
  • 11
  • 38
  • 59
  • Thanks for this code,it works,but how can i trace that whether user has click on like button or not...As per my app requirement i want to know whether user likes the page or not... – megha Nov 08 '12 at 09:30
  • for all other actions check this project https://github.com/brow/FacebookLikeView – DD_ Nov 08 '12 at 09:35
  • and for like button, use my method, the method that they use in this sample project is expired – DD_ Nov 08 '12 at 09:36