jQuery Facebook Wall FAQ

jQuery Facebook Wall FAQ

Does jQuery Facebook Wall require php?

No, the plugin comes with a php script to retrieve a facebook access token as a convenience.  The plugin itself only requires javascript, in fact it doesn’t require a server side scripting language at all.

Does jQuery Facebook Wall work with WordPress?

You bet, this is a WordPress site and it works here. If your a frontend dev it shouldnt be to great a challenge to integrate, it works just like all other jQuery plugins. If your into word press I have a new WordPress Facebook Wall plugin available here.

Will my Access Token expire?

No way man! You retrieve your access token once and you’re good to go for life. jQuery Facebook Wall uses an App Access token to retrieve your data from Facebook. Unlike User Access Tokens App Access tokens do not expire. At least until Facebook changes their minds. Check the docs if you want.

Can I use jQuery Facebook Wall with my .asp site (IIS)?

Yes, but it takes  few extra set up steps. You’ll need to change a few file extensions in the plugin and add .ejs mime type to IIS.

IIS doesn’t like the file extension of the ejs javascript templateing engine  used by the plugin (.ejs). You need to add a MIME extension for .ejs with type :text/html in your IIS administration panel. If you do that everything should work . Here is an blog I found on the subject

The problem: http://forums.asp.net/t/1442319.aspx/1

How to add a mime type in IIS: http://technet.microsoft.com/en-us/library/cc725608(v=ws.10).aspx

In my browser javascript console I get the error:

“Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App’s settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App’s domains.”

You need to add your domain to your facebook App. Go tohttps://developers.facebook.com select the app your using to pull the facebook data and make sure that in the App domains field the domain you are using is listed.


In my browser console I get the error:

“FB.getLoginStatus() called before calling FB.init()”


“FB.init has already been called – this could indicate a problem”

If you have another facebook widget on the page ( the ‘like’ widget for example ) try adding your app id to the widgets facebook javascript sdk initialization: search your page for

js.src = “//connect.facebook.net/sv_SE/all.js#xfbml=1

and add your app id to the end of it so it looks like so

js.src = “//connect.facebook.net/sv_SE/all.js#xfbml=1&appId=207177336999999″

If that doesn’t work you can try the following:

Some thing else on the same page has already loaded the facebook javascript sdk. See this posts for a  fix https://developers.facebook.com/bugs/379634558762425/

How can I get the Height of the fully loaded plugin?

Sorry to say but there is no easy answer to get the exact pixel height. The problem lies in that when you call the plugin you don’t know how much data (images , etc) is coming back from Facebook . If you try to do a .height() call immediately after you call the plugin you get nothing. A classic asynchronous front end problem. I’ve been trying to think of a slick way of dealing with this, maybe triggering a custom event or something. jQuery has a load event for images but it only applies to a single image and isn’t cross-browser stable yet. A hacky way of doing it is setting a timer and then getting the height of the plugin at experation of the timer:


This will give you the height after 5 seconds from the plugin instantiation.  You can tweak the time to get the best results for your case. Again it depends on the speed of your host, the amount of data you are pulling, Facebook’s network mood etc.

Overall it depends on what you need the height for, but if it’s a layout thing I would try and fix the problem with css. Send me a link  and a description of whats going on and I’ll try and take a quick look.


I set my post limit to 20 and I get fewer posts in my feed?

This has to do with how Facebook paginates result sets. Facebook doen’t make any guarantees about the exact number of results there graph api will return. See the Faceboook documentation. Depending on there status your results may vary. One way sure way to show an exact number of posts is to request and amount that bigger and then hide the rest will css.

For example if you wanted to show exactly 3 posts in each column of the timeline style feed you created on an element with class .facebook-wall. You could set your post limit to 15 and add the following css

.facebook-wall .fbw-left-column .story,
.facebook-wall .fbw-right-column .story
    display: none;
.facebook-wall .fbw-left-column .story:nth-child(-n+3),
.facebook-wall .fbw-right-column .story:nth-child(-n+3)
    display: block;

I can’t post comments or like, I turned debugging on and I get a message in the javascript console that says: OauthExcpetion (#200) Requires extended permission: publish_stream

Depending on your facebook account you may need different permissions. On about line 1053 of jQueryFacebookWall.js try changing:

},{scope: 'publish_actions,  user_likes'});
},{scope: 'publish_stream,  user_likes'});

I’m getting an alert that says “Looks like something is wrong with your Access Token: Unsupported get request”

Usually this means there is something wrong with the user you set for the “facebookUser” option. Try changing it to “natgeo” and see if it loads. If it does you know the facebookUser option is the problem so go over the documentation on how to get you facebook user name.

I get a JavaScript error in the browser console that states: ” data retrieval error -> An unexpected error occurred. Please try again later.”

This indicates that Facebook is having a problem retrieving data for your page or profile. This can happen for a number of reasons. One fix is to lower comment limits. By default the comment limit is set to 5000. Try explicitly setting it to a smaller number in the plugin options.

I have my language set to something other thane English. Every thing translates except some Album Names

So everything looks good except you see Album names like “Timeline Photos” and “Mobile Uploads”. you set the language options to “Deutch” what is wrong? Here is the problem, Facebook will return english Names for default album title unless you specifiy the local in the data request to their graph api. Here is how you do that (sorry no plugin option yet, its in the works)

  1. Make sure you are useing the unminified version of the plugin.
  2. Go to line ~843 of js/jQueryFacebookWall.js This is where we build the request for the album data.
  3. Add the following line of code to the request string
  4. The finished code should look like this:
    var albumUrl = "https://graph.facebook.com/v2.1/"+this.options.facebookUser+"/albums/access_token="+this.app.appToken+
    if(callbacks[this.options.albums.order]){ howmany = 0; }
        callbacks.splice(this.options.albums.order, howmany, albums);
  5. here is a list of the country codes Facebook Country codes