We have a Face book page.We add a custom FBML tab.Now we want to add Comment Face book plugin.I tried to add an script what i got from Face book Social Plug in.The code is
<div id="fb-root"></div><script
<src="http://connect.facebook.net/en_US/all.js#appId=178089302222317&xfbml=1"></script><fb:comments numposts="10" width="425"
publish_feed="true"></fb:comments>
After that i put this script to custom FBML page but its not reflecting any thing please suggest to solve this issue.
Thanks in advance.
You should start over and not use FBML but use an iframe instead.
You are trying to create an app on a page tab. To do this take a look at the FB dev site and it shows you how to get started with an iframe based app and then how to get that to work on a page tab.
https://developers.facebook.com/docs/guides/canvas/#tabs
Once you move to iframes you can use all of the social plug-ins and other advanced features like the Graph API.
<fb:comments xid="some_unique_id_doesnt_matter_what" canpost="true" candelete="false" publish_feed="true" numposts="10" returnurl="http://facebook.com/YOURPAGE">
<fb:title>Headline</fb:title>
</fb:comments>
this is what you are looking for.. your code doesnt work in FBML, yours is XFBML
<fb:title>
is optional
Related
Facebook iframe is showing up in the middle of my Joomla article. I am wanting to make it go away and have tried nearly everything I could think of. Please help! the article link is http://blowingrocknews.com/community-life/general-news/2658-tis-the-season-forgetting-your-teeth-knocked-out.html
You should probably remove the old FBML style of Facebook commenting, and instead switch to using Social Plugins, like https://developers.facebook.com/docs/reference/plugins/comments/
I feel like people have been having the opposite of this problem, I cannot figure how to have links open up outside of fb and not with the iframe.. I am posting material that rests in an FB app hosted by my server. The page has links to other sites, but when they open up they are still in the facebook iframe.
using basic:
<a href= "http...."><b>Blank.com</b>
looks like this
Click link...
I'm a rookie and any help would be great. Thanks
target="_blank" works if you have set up an app for the iframe.
Have you tried the target attribute?
example.com
I have a Facebook fan page, and some tabs in it. one of which is a static fbml one which besides having and img tag has the following
<fb:google-analytics uacct="UA-19191919-4" />
problem is.... Facebook ignores this tag and I see no evidence of Google analytics code being executed...
any ideas ?
Use an iframe for your apps with regular analytic code. Facebook doesn't use FBML anymore.
I'm trying to use xfbml within my facebook app (iframe) but it somehow doesn't show up.
I copied this tag into one of the pages...
<fb:share-button href="http://apps.facebook.com/example" type="box_count"></fb:share-button>
..but as i said it doesn't show up.
Any idea how that works?
Thanks in advance!
Are you loading the Facebook Connect javascript libraries? fbml is not going to render without Facebook's javascript parsing it.
Try this tutorial (its German) but there are Code-Snippets:
http://www.my-digital-home.com/2010/06/09/facebook-xfbml-leicht-gemacht/
how and where we must load the Facebook Connect javascript libraries?
I am working on writing a small Facebook application just for fun and learning. Unfortunately, the Facebook developer documentation, wiki, and samples leave much to be desired.
If my application is an iFrame app (PHP), can I use FBML within the page or do I need to use the XFBML? If I need to use XFBML, is there a repository of snippets somewhere that I could look through?
I am looking to add a friend selector box. For example, welcome to the app, pick an object, send it to 20 friends.
You would think a friend selector would be a stock component for Facebook apps, but apparently not.
I can use FBQL and CSS to define my own, but wouldn't standards and consistency be nice?
Is there a definitive, from the ground up, easy to follow Facebook app developers tutorial that covers the FBML tags, the XFBML tags and what goes where with examples?
I think in every answer I make to a Facebook question, I pretty much mention that "Facebook documentation sucks, so don't feel bad if you can't find something."
The answer is yes, you can definitely use FBML in an IFrame application. I do it routinely. Facebook is blurring the lines between IFrame apps and FBML apps with XFBML, which is great. Basically, XFBML is just regular FBML, except that it is parsed and rendered via the Facebook Connect javascript libraries. Because of this, you see a bit of a delay before an FBML control is rendered, but generally this isn't a big problem.
I'll give you an example of loading a friend selector straight from one of my IFrame apps. You'll see that it's surrounded by fb:serverfbml tags, which you need to render several of the more complicated FBML tags. The FBML items that don't need a fb:serverfbml tag around them are listed on the XFBML wiki page.
Anyway, some code:
<fb:serverfbml style="width: 650px;">
<script type="text/fbml">
<fb:fbml>
<fb:request-form
action="http://my.app.com/invite/sent"
method="POST"
invite="true"
type="My App Name"
content="You should use My App Name. All the cool kids are doing it.
<fb:req-choice url='http://apps.facebook.com/my-app'
label='<?php
echo htmlspecialchars("That sounds sweet!",ENT_QUOTES);
?>'
/>
" >
<fb:multi-friend-selector
showborder="false"
actiontext="Invite your friends to use My App Name."
exclude_ids="1234556,465555"
rows="3"
/>
</fb:request-form>
</fb:fbml>
</script>
</fb:serverfbml>
Escaping quotes gets a bit tricky with all the nested tags, so you have to watch that. You can see my example is from a PHP app, and I left an htmlspecialchars() escape call in there just for illustrative purposes (even though that particular string doesn't need escaping).
Anyhow, if you've got Facebook Connect already installed for your IFrame app, then this should work with a bit of tweaking. If you don't have Facebook Connect going yet, then follow the Rendering XFBML instructions on the XFBML wiki page.