Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
176 views
in Technique[技术] by (71.8m points)

rendering facebook wall in an iframe tab- fb:wall replacement and other options

I am trying to build a Facebook app that generates a tab that includes a page's wall complete with "post to wall" dialog below some content. So far the only app that I know that does that is Bandpage (for example http://www.facebook.com/beyonce ).

It turns down that rendering a wall this way in an iframe is not trivial. Here are some of the approaches I've researched:

  1. Using curl to scrape a wall: not only is this an ugly solution, but Facebook protects against that.
  2. Using Social Plugins ( http://developers.facebook.com/docs/plugins/ ): Like Box (http://developers.facebook.com/docs/reference/plugins/like-box/) renders a wall, and with "faces" and "header" options turned off + Autoresize js call it almost looks like what I want, but does not include a comment field and the look of the box can't be customized.
  3. Using Graph API it's easy to get the wall's feed in JSON, but then rendering and styling it is a nightmare - there must be a simpler way.
  4. Using fb:wall - this is deprecated and will be turned off in a few months, but it's not even working as a stopgap. Or does it?
  5. Using fb:fan which supposedly takes a css stylesheet.

So - it seems possible to render the wall in a tab since Bandpage is doing it, but how?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This might possibly help you overcome your problem in #3 :

Using Graph API it's easy to get the wall's feed in JSON, but then rendering and styling it is a nightmare - there must be a simpler way.

Trying to "recreate" the look and feel of any good implementation is a hard task.

The following link might assist you with styling your own elements to look like facebook elements.

http://ckrack.github.com/fbootstrapp/

Fbootstrapp is a toolkit designed to kickstart development of facebook iframe apps in both relevant sizes. It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more, styled in the typical facebook look and feel.

Here are a few examples of the styling :

enter image description here
(source: softpedia-static.com)

Notification boxes

enter image description here
(source: softpedia-static.com)

Form Elements

enter image description here
(source: softpedia-static.com)



In closing I would like to bring to attention the ever nearing deprecation of FBML.
We as facebook developers are solely responsible for keeping up-to-date with the changes that 3rd party API's, on which we base our development, make to their systems. There are no alternatives to FBML, only new (and in many cases) better ways to display/extract data from facebook's servers.

A great place to keep updated on changes and new features would be the Facebook Developers Blog and the Facebook Developers Roadmap.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...