How to do like page on facebook in program side - facebook

I have problem on Facebook "like" button.
I put facebook "like" button in my page but I click that button it is not navigate to what I gave in href link and I want to perform facebook "like" button action same as facebook.
I can "like" this link on facebook how to do same as in my website using facebook "like" button ?

You can only 'Like' a fan Page by clicking the FB supplied button that sits in the parent FB page outside of your iframed application page. As frustrating as this can be to designers and UX developers it is potential security flaw if an application (boxed in as a Fan page) is allowed to 'Like' itself. I.e. users could be duped into 'Liking' a Page onload without their consent.
You can get the count of Likes for a Fan page. That is the only 'Like' action permitted on this object type.
http://forum.developers.facebook.net/viewtopic.php?pid=294757

You can't add likes to a profile using the Facebook Api.
Read here for more details 'Like' a page using Facebook Graph API

Unfortunately, this is not possible. You can only like a post via the graph api acccording to the docs.

Unfortunately it is not possible via any of the API's to like a page programmatically.
This is to prevent spam where people create apps to mass-like pages.
Hope this helps.

You cannot make a user like a page. That isn't possible unless you use a XSS attack (which facebook probably prevents), and you'll get banned from facebook. If you want to know how to place a like button, see http://developers.facebook.com/docs/reference/plugins/like/

Related

Force User To Like FB Page Before Visiting My Website

As part of a website that I am developing, I have a Like Gate Page that I want to use in order to force my site visitors to press the like button before they are redirected to the site homepage.
When a Liker visitor comes back for the LIKE Gate page he/she should be redirected automatically to the website homepage (he/she already pressed like).
Important:
The whole website including the Like Gate is not found in a Facebook App/Page Tab!
It is OK to ask the user to login before he/she can press the Like button.
Well, in your web page you could implement Facebook login and get user's permission to see his/her likes. Get said likes from Graph API, see if your page is in the list and depending on that, either show your web page, or redirect user to your facebook page. You will need user_likes permission for that.
By using Facebook Javascript SDK Methods FB.Event.subscribe, FB.getLoginStatus, FB.api, authResponse, pages.isFan, access.token and Javascript SDK and a little bit PHP SDK.
I saw one, almost perfect that can be site-integrated, fully-explained, and free in this blog: http://daneworx.blogspot.com/2014/02/how-to-force-users-to-like-your-page.html

Like with OpenGraph protocol

I can publish without problems with the facebook api OpenGraph, but I do not see how to automatically "like" a page with OpenGraph, in fact I would like the user to like automatically a page when he accepts my application, an idea on how to proceed?
Thanks
You cannot have a user like a page on Facebook programmatically with the API... Wise choice of Facebook's too, imagine the abuse that would occur. You should use the facebook like button instead.
Confirmations:
'Like' a page using Facebook Graph API

Get Likes on fb fan page but referrals to website

Ideally this is what I would want:
I have a fb fan page with around 2000 likes. I also have a fb app by
which I can run social plugins on my website. I put up a like button
using the following code on my website: {fb:like
href="http://facebook.com/traveltriangle"}
I want to show Like button on my website such that if user clicks on
it, my fan page's 'like' increases. However I also want that for the
post that goes on user's timeline, it links to my website and not to my fan page.
How do I achieve this?
I am also fine if I change href in the fb:like code to point it to my website. However then the referral links are good, but I can not use those likes to post my users later.
I don't think you can use merge tam. Fb Fan page is one thing and Fb App is other thing. FB App helps you get user data from what I know from their database while Fan page helps you promote your business.
Why do you need to merge them?

Facebook Like Button On My Website To Like A Facebook Page, Not My Website

I have a Facebook like button on my website, however as it works currently it only lets users like the page that they are currently on. Is it possible to make the button like our Facebook page instead of our website?
Go to the developers page which provides Social Plugin. There, just add at the "URL to Like" of the button, the address of your facebook page. E.g. http://www.facebook.com/mypage
This way, once the users push the like button, your facebook page will get automatically a like and they will also follow the updates of the facebook page
You can use the badge creator to create a badge for your page that a user can interact with for "like" purposes.
you could try this page this might work better for you, they can like the facebook page direct on your site http://developers.facebook.com/docs/reference/plugins/like-box/
This is because you haven't put your right page url in facebook like box generator. Go to you facebook page and copy the link from there. Now use this to generate facebook like box. You can also get help from this http://www.codematrics.com/my-website-and-facebook-page-have-different-likes/

Is there anyway to Like a Facebook Page from within the website, or with the API?

I'm just wondering if there is anyway to have the like-page correspond to the Facebook Page rather than the website. My organization mirrors it's efforts inside of Facebook, and so I don't see any reason to even make Facebook aware of the website.
SURE!
The Facebook Like Plugin make it very simple to Like your Facebook Page from almost anywhere:
Can I link the Like button to my Facebook page?
Yes. Simply specify the URL of your
Facebook page in the href parameter
of the button.
Reference.