Facebook and retrieving a users "wall"

Posted by Neurofluxation on Stack Overflow See other posts from Stack Overflow or by Neurofluxation
Published on 2010-06-08T14:58:01Z Indexed on 2010/06/08 15:02 UTC
Read the original article Hit count: 375

Filed under:
|
|
|

I have been given the dubious task of working with the Facebook API.

I have managed to get quite far with all the little bits and pieces (bringing in "fan pages" and "friend lists"). However, I cannot seem to import a users wall into my App using SOLELY Javascript.

I have this code to bring in the users friends:

var widget_div = document.getElementById("profile_pics");
                FB.ensureInit(function () {
                    FB.Facebook.get_sessionState().waitUntilReady(function() {
                    FB.Facebook.apiClient.friends_get(null, function(result) {
                        var markup = "";
                        var num_friends = result ? Math.min(100, result.length) : 0;
                        if (num_friends > 0) {
                            for (var i=0; i<num_friends; i++) {
                                markup +=
                                "<div align='left' class='commented' style='background-color: #fffbcd; border: 1px solid #9d9b80; padding: 0px 10px 0px 0px; margin-bottom: 5px; width: 75%; height: 50px; font-size: 16px;'><fb:profile-pic size='square' uid='"+result[i]+"' facebook-logo='true'></fb:profile-pic><div style='float: right; padding-top: 15px;'><fb:name uid='"+result[i]+"'></fb:name></div></div>";
                            }
                        }
                        widget_div.innerHTML = markup;
                        FB.XFBML.Host.parseDomElement(widget_div);
                        });
                    });
                });
                /*******YOUR FRIENDS******/ 

            FB.XFBML.Host.parseDomTree();

Any idea whether I can change this to retrieve the Walls?

Thanks in advance you great people! ^_^

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html