Adding a fan box on a facebook fan page - facebook

I am trying to add a fan box on my fan page using the <fb:fan> tag. But it just doesn't get rendered on the page.
I also tried using an <fb:iframe> as mentioned here, and setting its source to another file which contains the code for <fb:fan> tag. But even that doesn't work.

This wont work in StaticFBML. The only work around is to use an iframe with StaticFBML. In the Iframe, you can then load the widget.

Related

How to customise Facebook shares

I've successfully added a Share button to my website using the following code:
https://developers.facebook.com/docs/plugins/share-button
It produces a popup with a link to the og:url along with the title of the linked page and a picture from it, which I can then post, and it shows up on my Facebook.
I am having 3 issues with this:
I've update the og:url and data-href after page load, using jquery, but the new values get ignored when I Share.
the og:title, og:description, and og:image don't appear to be used at all.
Sometimes I'd like to Share some custom text (and images if possible) without any url.
I'm aware that Facebook provide other tools/APIs that provide more versatility but it seems that would mean my site would have to go through a review process, and I'd have to code for security. This is not an option and I want to stick to the popup method.
Hope someone can help. Many thanks.
If the tags do not change when posting, refresh (and test) the tags in the debugger: https://developers.facebook.com/tools/debug/sharing/
Dynamically created Open Graph tags (with JavaScript) will be ignored, the tags have to be in the original page source.

How to put 2 Facebook fan page like box on one page

Is it possible to put two Facebook fan page like boxes on the same page?
And if so, how do I do it.
I'm able to put one but not more - is it a js problem? would iFrame work?
Thanks!
You can add as many Like buttons as you want by just providing the value for attribute href within the code for your plugin wherever you want the plugin to appear on your page. If not specified it defaults to current page.

Get parent page html content from facebook iframe?

Here I am working with facebook application.
I have create page which are working in facebook iframe window.
I want to access main(Parent) window html source from iframe which create by me.
Here I have tried for
parent.document and window.top.document and window.parent
all three are not working in my case. If you have any other idea then let me know,
Thanks
You can't access content outside of your IFrame.
Otherwise you could change content outside of it and modify Facebook,
just because your IFrame is loaded inside of Facebook ;)

Finished writing my Facebook App, how do I get it into the tab?

I'm changing from using Static FBML to dynamic pages. The only XFBML tag I'm using is fb:like.
Anyway, it renders fine on my test server, and then again on facebook under the app's URL.
I want to put it on the tab of a Fan page I manage.. how can I get it on there?
IFrames aren't available in tabs yet... you need to use FBML and fb:like is not a valid FBML tag.
They wanted to change this because they are beginning to deprecate FBML. But you should try the iFrame hack instead.
I'm not able to find it on google right now but it works like this:
You create a fb:js-string with the fb:iframe tag in it and then load it in a div as soon as the user clicks something.

Adding LIKE plugin under fan page tab

Is this possible?
I tried and getting error FBML Error (line 50): unknown tag "fb:like"
This is possible but it is tricky. As fan pages are only FBML, the only way I found is to load some html code thought an Ajax call, and that code contains an iframe (which will be a page containing your fb:like social plugin).
Problem is that facebook doesn't allow to autorun code, you need the user to click on a link or a picture to make this happen.
You can try this solution, replacing "http://www.helloworld.com/iframe.php" by a valid page with you like button:
http://forum.developers.facebook.net/viewtopic.php?pid=262170#p262170