Loading cover pic Facebook SDK

im using the following:

$fql = "SELECT 
            name, pic, pic_cover, start_time, end_time, location, description 
        FROM 
            event 
        WHERE 
            eid IN ( SELECT eid FROM event_member WHERE uid = 127795963908033 ) 
        AND 
            start_time >= now()
        ORDER BY 
            start_time desc";

$param  =   array(
    'method'    => 'fql.query',
    'query'     => $fql,
    'callback'  => ''
);

and

       echo "<img src={$values['pic_cover']} width='600px' />";

This works great for pic, but when i change it to pic_cover as above it returns null.

any ideas? thanks :)

Answers


That is because its simply not the right name plus the actual field named 'cover' is an array.

{
  "error": {
    "message": "(#100) Unknown fields: pic_cover.", 
    "type": "OAuthException", 
    "code": 100
  }
}

That should do:

echo $values['cover']['source']

You can always use the OpenGraph Explorer to see if your FQL executes correctly and what JSONs get returned.


Need Your Help

Space filling algorithms?

algorithm space fill

I'm now working on a problem I can't find a name for, so googling anything is like impossible, therefore I try to describe it here.

Using Touchpad gestures in wxPython?

python user-interface wxpython

I am trying to create an app using wxPython that has a side swipe gesture in it i.e. on the Mac touchpad. I had a search around and I can't find any reference to multitouch support in wx. Does anyb...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.