Facebook to check "like" on fan page - facebook

I noted there is a link to generate "like button" code at :
http://developers.facebook.com/docs/reference/plugins/like/
However it wasn't act as the top of fanpage "like" button which will redirect users to another page if I setup to check the pages liked or not. Is there any other way that I can generate the button as the top of fanpage "like button" behavior or way of using the recent plugins like and redirect users once they liked the page?
Eric.

If you are using a XFBML like button then you can use the JavaScript SDK to detect likes by subcribing to the edge.create event using FB.Event.subscribe
FB.Event.subscribe('edge.create',
function(response) {
// Do redirect here
}
);
For more information on the Facebook JavaScript SDK please go here:
http://developers.facebook.com/docs/reference/javascript/

Related

Make FB Like button take user to FB page

When clicking the Facebook Like button on my site I want the user's browser to be taken to my Facebook page. Is this possible?
This is possible.
If you use the Javascript SDK to subscribe to facebook events http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/
then you subscribe to the edge.create event and then fire some js to do this:
FB.Event.subscribe('edge.create',
function(response) {
window.location = "http://facebook.com/mypage";
}
);
Hope this helps

Like button likes Facebook Auto Created Page rather than my Own Facebook Fanpage

I have an Official Facebook page I've setup for my new company.
I have a like button on my website with the appropriate meta tags related to that website.
But when Someone clicks the "like" button, it "likes" a page on facebook that facebook has automatically created thats not related to my own Facebook Fan Page using the META tags into from my webpage. I am using the iframe code for the like button.
How can I stop this happening? Thanks so much.
On the site you have chosen the Style of your "like" Button you have to put in the Url of your company Facebook page again, if you don't do this you'll get a like-Button for a Facebook page.

Invite friends dialog

I have an invite dialog on my page:
<a href="#" onclick="sendRequestToManyRecipients(); return false;" >xx</a>
<script language="javascript" type="text/javascript">
FB.init({appId : 'myappid', status : true, cookie : true, oauth: true});
function sendRequestToManyRecipients() {
FB.ui({ method: 'apprequests', message: 'xxx'},requestCallback);
}
function requestCallback(response) {
// Handle callback here
}
</script>
When the invited user clicks the invite, he gets linked to the app, but I want the user to get redirected to a page like http://www.facebook.com/pages/xxx/xxx?sk=app_xxxx.
How can I do that?
That's not possible without some custom coding - the requests interface exists to drive traffic to apps on facebook, not to page tabs, there's no way to have Facebook send users to a tab when they accept the request.
You could just implement something on your canvas landing page that redirects users back to a page tab based on the information in the request as a workaround.
previous version of the apprequest which is request-form this was possible: How can I include a link in a FB app request?
However current version of apprequest : facebook guys lets only redirect to your app: https://apps.facebook.com/yourapp
#Vihay comments helps this custom workaround to redirect to page.
Hoping next version apprequests, facebook enables redirect to links within the fb app.
Agree with previous answers. Facebook will redirect to your app, which is just a Facebook wrapper around a page you can provide. That page can then use a client-side redirect to whatever page you'd like (like what Klout does).

Facebook Fan Home Page Redirect

I speak any facebook fan page.
My aim is: I want to redirect "home (welcome) page of my fan", when i select facebook like button. Also, anytime i go to this fan page, again redirect home page. So, doesn't redirect fan wall page. So, home is main page. is it possible? (I know it is silly, but I want to learn it)
I think it is impossible. Facebook API lets you create applications which you have to launch. Adding events for I like button pressed is something that Facebook API don't let you modify.
I'm not sure I understand the question correctly...but if you are looking to subscribe to the "like" event, you can in fact do that:
FB.Event.subscribe(‘edge.create’, function(response) {
// do whatever you want after the like event
});

How can I make a Facebook 'like' button for an iframe Appication?

I'm trying to make a like button for my iframe facebook app.
With an FBML application, clicking the like button would put "Pete likes AppName (Application)." on your wall.
For my iframe app I'm using the following FBML:
<fb:like href="http://apps.facebook.com/appname/"></fb:like>
However Facebook changes the hyperlink to the iframe's domain:
http://mydomain.com/app/
Which puts the following on my wall: "Pete likes App Name on mydomain.com" and the link follows through to http://mydomain.com/app/
How can I make a like button which works the same as an FBML application?
The application's profile is what is "like-able".
i.e., this URL: http://www.facebook.com/apps/application.php?id=YOUR_APP_ID