How do I specify the URL of your Facebook page in the href parameter of the button? - facebook

I have a like button on my website and I created it prior to having a fb fan page for my website. Now that I have a fanpage, I want to link my website with my fan page. How do I do that? It says:
Simply specify the URL of your Facebook page in the href parameter of the button
- but I have no idea how to do this.

I'd suggest starting from scratch since you cannot find your like button code. See https://developers.facebook.com/docs/reference/plugins/like/. Configure the like button to your desires, and copy the code from there.

Related

New method to accomplish the same functionality as the old Facebook sharer.php

The original method for sharing links with a custom image, text and link appears to have been stripped from Facebook. I for one would love to see them bring this back.
Here is my situtation. I have a Facebook tab that loads a page that is hosted under my hosteddomains.com. I setup a Facebook app to work with my Facebook tab. When I try to use the new "Share Dialog" if the link I want to share is not the same as the app domains then i get an error and I can't share the link. Am I doing something wrong or is this what they intended to do?
IF that's what they intended to do then there is no way that this will replace what sharer.php could do. I could be on any site and share any link with an image to Facebook and have it posted to my wall.
The question is if i am on facebook tab and i want to share a link (I want a dialog box with a custom photo, title, link, and summary) and allow my users to post this custom message to there Facebook status.
Maybe i am confused about how to accomplish this, but so far i am not having much luck.
I miss the good ole days when i could just construct a URL and that would give me the ability to share what i want to share. Twitter and Pinterest have these methods.
Here are some code examples of things that I've tried that did not work:
Option #1:
The url in this option goes to page that I created on hosteddomains.com that has the Open Graph Meta Tags in it. My idea was to share these pages from my server that will direct them back to my Facebook tab. The result I was getting from this method was seeing the title of the tab from my FB page and description. The reason turned out to be that if i set the og:url to my Facebook tab page, that's the page that would get scraped. That's not what i was expecting from this method. I thought it would take the meta tags from the page i shared and the url with it. Not take all of the info from url and ignore the meta tags.
<a href="https://www.facebook.com/sharer/sharer.php?u=[URL]"
target="_parent">SHARE ON FB</a></p>
Option #2:
Tried using Facebook Share Dialog. I had an interesting time with this one. I setup a new Facebook app. I tried the Facebook tab as the URL and also my custom url to the page that has custom open graph meta tags. The facebook app has two App Domains - hosteddomain.com and websiteA.com. I also created a Page Tab section. The page tab section loads the HTML page that was loaded in the tab we made for our facebook page. Issue with this method is I don't get a custom open graph options set from my php page. I'm picking up information from the facebook tab again. At least now the dialog box shows the name of the new app. I am limited in what i can share using this method. The url i share has to belong to the App Domains. In order to have multiple app domains, I had to make that Page Tab section and then add the second url to the App Domains field, otherwise i got a warning.
<a href="https://www.facebook.com/dialog/share?app_id=[appID]&display=popup&href=[url]
&redirect_uri=[url]&ref=s" target="_blank">SHARE THIS</a>
Option #3
The last thing I tried was the fb-share-button using the Javascript SDK. I get the same result as option #1. I don't think there is much difference between these two. Option 3 here is a bit easier to deal with and cleaner code. In this example, the url is to my custom page on hosteddomains.com that has my custom open graph meta tags. That doesnt seem to matter though. It still pulls the info from the og:url meta tag. I tried removing the og:url meta tag. I get the same result. Is it the Page Tab info interfering?
<div class="fb-share-button" data-href="[url]"></div>

Like button doesn't work with any Facebook Page

Apparently, something happened with facebook that i cannot like any Facebook page (in ex. http://www.facebook.com/TheSimpsons).
You can like such page on a page itself but not via Like button on your website.
Even on facebook documentation page (http://developers.facebook.com/docs/reference/plugins/like/) if you put this url and try to click generated button, it will like and immediately unlike it.
Are there any known reason for such behavior or workaround?
This was Facebook bug which is closed now

specific fb page will not work with like button

I've had this like button/box setup for this specific page for some time. But now it;s stopped working:
Using code generated (for iframe) on this page:
http://developers.facebook.com/docs/reference/plugins/like/
to display this fb page:
http://www.facebook.com/JohnPurkiss
does not display/work. If I amend the like button url in the iframe to another fb page, it does work. I'm not tryinig to use a button/plugin that requires an app. Just a plain 'ol simple button. But it appears to me there is an issue with this specific fb page (johnpurkiss one above)
Any advice/help greatly appreciated.
The problem here is that the "page" you linked to is in actual fact a personal user.
You can not "like" a user in the same way that
you can not add a page as a friend...
or "poke" an event...
or subscribe to a photo...
You'll gave to provide an actual page to be liked.
As you can see from the screenshot below taken from the link you provided, there is no like button to be found.
Only an "Add Friend" and "Subscribe" button. I'm not sure if converting your profile into a page is the way you want to go, but it is possible. You can learn how at this link.

Facebook Like Button: Unify a Url & a Facebook Page

In Facebook docs it says:
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.
My problem is that I don't want the Facebook page to be the target of the 'like'.
So currently, the like button on my site attributes the likes to the root domain 'http://example.com/', which is what I want.
This has got many more likes than the facebook page 'http://facebook.com/examplecompage'
Is there a way to make the likes on my facebook page contribute towards the root domain likes?
That is not possible, since they are treated as 2 different objects.
And just to clarify, the documentation on the Facebook developer site is referring to the Like button that you create to be displayed on your site, not the Like button you get on Facebook automatically when you create a page.

How do you put a "LIKE" button on your Facebook Page?

Every post on here seems to be directed to Advanced Users, I just want to know simply how to place a "Like Button" on my Facebook page? Where do I put the HTML code thats generated for me?
Use lint, place your link there and at the bottom you'll have iFrame code. You'll place it to your website (anywhere) and you're done