Is it possible to post FBML (a way to use HTML-like content) data through Graph API? - facebook

Any way to join FBML and Graph API to post HTML to a FB page?
FB Iframe's based solutions are welcome too.
EDIT 24 hrs after: After play with the Page Tab functionality I have found that it is the best way to embed custom content (HTML/CSS/javascript) inside FB pages.
Basically are iframes. In the Page tab settings you must enter the URL to embed. That's all! You can use Signed Request to get the id's page and something called app_data. With that you can dynamically manage your embedded content!!!
Thanks to DMCS to guide me to it.

Yes, while the FBML is being deprecated, there is another way to accomplish posting something to a page.
You can see an example here of what is called a page tab application. It is an app specifically designed to be used on a Facebook page. It becomes a tab (can even be set to the default of what a visitor sees).
Here's an example: http://www.facebook.com/GoDaddy?sk=app_233280480043288
You can see that the content is HTML and you have full control over that HTML since it lives on your server. This also demonstrates how a fan-gate operates.

https://developers.facebook.com/docs/reference/fbml/
We are deprecating FBML. On Jan 1, 2012: FBML will no longer be supported on Platform. June 1, 2012: FBML apps will no longer work. All FBML endpoints are removed. If you are building a new application on Facebook.com, please implement your application using HTML, JavaScript and CSS. You can use our JavaScript SDK and Social Plugins to embedded many of the same social features available in FBML.

Related

Can I have Google maps within a Facebook fan page?

I need to use Google Maps within a Facebook page (as a new tab). Is this possible? I searched online and could not find out how this can be done. Please help.
You will have to use the fb:iframe element to display an iframe that contains the Google Map. You cannot embed the Google Map directly in a FBML tab because you cannot use the outside javascript. Note also that Facebook will soon be replacing FBML tabs with iFrame tabs so in a few months this will not be an issue.
Here is the documentation on the fb:iframe http://developers.facebook.com/docs/reference/fbml/iframe
Unforuntately this cannot be done as complex Javascript and iframes don't work. This is a BIG NO!
Hopefully in future (end of 2010) Facebook will change some stuff!

Can I embed my own page in a facebook app?

I want to embed a store locator in Facebook the way footlocker does.
Is it possible to just make a facebook app that serves my stand-alone store-locator page without having to re-write my store-locator page for facebook?
Any good guides/how-tos for serving a stand-alone page through a facebook app like this?
This is very common and easy to do. All you have to do is create a facebook application and point your "canvas url" to your store locator page. So for example, if your store locator is www.example.com/storelocator set your Facebook application's canvas url to that page. If you look at that footlocker app you can see that the url of the iframe is actually http://unlocked.footlocker.com/main_store_locator/
If I understand you correctly, you are looking for the canvas guide. According to the documentation you can show your page in an iframe inside a tab on your facebook page.
Unfortunately, no. When you add a FBML/iframe app to your Facebook page, Facebook loads the content, caches it, and injects it into the DOM; it does not actually load it in an iframe. As such, there are restrictions about which elements can be included (eg, only <body> content), how Javascript is used (external libraries require some tweaking), and any element that references an external source (eg, Flash loading content) must have the target domain whitelisted for your application. In short: it's a pain, but it can be done.

Facebook application - Add wall

How can I add a wall on my facebook-application (fbml).
Do I have to store the wallposts (user-id and comment) in my database, and display them using fb:wall, fb:wallposts, or is it a plugin like fb:comments for this? If so, how do I add a textfield/form for interacting with the wall?
Figured it out. It has to be stored in a separate database. fb:wall etc. just mimics the look of a wall-
http://developers.facebook.com/docs/reference/fbml/wall/
FBML has been deprecated. Starting June 1, 2012 FBML apps will no longer work as all FBML endpoints will be removed. If you are building a new application on Facebook.com, please implement your application using HTML, JavaScript and CSS. You can use our JavaScript SDK and Social Plugins to embedded many of the same social features available in FBML.

Facebook iframe embed in profile pages - what the heck

We're looking for a way to embed an iframe and specific content into a fan page (not a profile). Apparently it's not directly allowed using the fb:iframe tag but I did find some hints here: http://www.facebook.com/PagesDesign#/profile.php?fbhref=iportfolio.html%3F_fb_fromhash%3D53f3ede8dd88aad33d3bc346401a683c&id=92993272816&app_page=1&v=app_96944267235
Looking for a more direct way though.
Dave
Unfortunately, I don't think there's a good way to do that: iframes are specifically blocked in fan pages. If you've got an iframe application and you want to have a tab show up, you can force it to work as FBML by appending fb_force_mode to the query string.

Facebook tab application scripting

I have a web application that I am trying to port to Facebook. The app uses a few external javascript files. So initially I wanted to create an iframe Facebook application. However, it turns out that you cannot use iframes when creating a tab application(which is a requirement). By tab application I mean placing your app on the profile page next to the wall, info, photos, ect. tabs.
Does any one know of a good tool to help convert my javascript to the FBJS scripting? Or better yet does anyone have a work around so that I can include my own javascript in this tabbed application?
Thanks for the help.
From my understanding loading external js is disabled when the user first visits the tab page (the passive page). But, once a page loads and the user interacts with it in some way (ajax post, redirect) the page is "active" and you can run flash, javascript, etc...
If you're using Ruby on Rails and Facebooker, I wrote a nice little tutorial on how to inline your javascript inside a profile tab while keeping your code DRY :
http://modelix.net/2010/03/javascript-inside-a-facebook-profile-tab/
I thought you might find this interesting, how to add a Live Chat Tab to a Facebook page:
http://apps.svpn.com/live-chat-tab-for-facebook-pages/