Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook - Get & Display me/og.likes in Video application
    primarykey
    data
    text
    <p>Have built an video app that publish user actions towards Facebook. </p> <p>In this app i have implemented an "Favorite" function that i have hooked up towards a basic open graph action "og.like"</p> <p>I want to be able to display video's that user liked and apply my own styling to that.</p> <p>Basically i want to display "<strong>Title</strong>" "<strong>Url</strong>" &amp; "<strong>Image</strong>"</p> <p>So i use the PHP-SDK towards authored user with active access token and execute </p> <pre><code>$response = $facebook-&gt;api( 'me/og.likes', 'GET' ); // handle the response </code></pre> <p>How do i now sort out my correct fields and display them ? </p> <p>Am not hardcore at either php or javascript but will be able to sort this out if i just can get a little push in the right direction. Like just showing the raw data</p> <p><strong>Update</strong></p> <p>Finally a little progress, adding </p> <pre><code>print_r ($response); </code></pre> <p>Will write out the raw data, Now i know that am on the right way.</p> <p><strong>Array returned</strong></p> <pre><code>{ "data": [ { "id": "123", "from": { "name": "Mathias", "id": "APP_ID" }, "start_time": "X", "end_time": "X", "publish_time": "X", "application": { "name": "APP_Name", "namespace": "", "id": "321" }, "data": { "object": { "id": "139", "url": "Url to like", "type": "video.tv_show", "title": "title" } }, "type": "og.likes", "no_feed_story": false, "likes": { "count": 0, "can_like": true, "user_likes": false }, "comments": { "count": 0, "can_comment": true, "comment_order": "chronological" } }, </code></pre> <p>And then the next.. </p> <p>From every app "like" i would like to display <strong>Url</strong> ,<strong>Title</strong> &amp; <strong>Image</strong></p> <p>From what i understand so far my main problem is that this is nested arrays, Did try with single level arrays and there i did manage to display correct data just by</p> <pre><code> echo $response[name]; </code></pre> <p>So how do i digg in and loop this around, All tips are welcome,</p> <pre><code>{ "id": "139", "url": "url", "type": "video.tv_show", "title": "titke", "image": [ { "url": "image_URL", "secure_url": "image_URL", "type": "image/jpg", "width": 1024, "height": 576 } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload