fabian
fabian

Reputation: 5463

FQL does not return post with customized location


i wrote a small FQL script that returns the latest wallposts of my fanpage. The script works fine. Until today.

The situation:
I published a wallpost with custom settings: The post is only visible to German fans.

The Problem:
My fql query ignores this "special" post.

My little PHP program looks like this

$query = "    SELECT
                        post_id, message, created_time, attachment,action_links, privacy, type
                    FROM 
                        stream 
                    WHERE 
                        source_id = ".$page_id."
                        AND actor_id = ".$page_id."
                    ORDER BY created_time DESC";

$param  =   array(
               'method'     => 'fql.query',
            'query'     => $query,
              'callback'    => ''
          );
$result = $this->facebook->opengraph->api($param);

The nugget:
Facebook returns the status message if i call the special post like this: https://graph.facebook.com/367501354973 (Source: http://developers.facebook.com/docs/ref … api/status)

Thanks for helping

Upvotes: 1

Views: 393

Answers (3)

Igy
Igy

Reputation: 43816

In general, content which is demographically targeted or restricted will only be made available to a user access token for a user who meets the demographic set - check that the user you're trying to access the posts as is actually in the demographic you targeted the post at.

Upvotes: 1

Colm Doyle
Colm Doyle

Reputation: 3858

If your FQL is calling without an access_token, then the API won't return any posts that any kind of restrictions placed on them. In your example, geo gated to Germany.

The reason it's working via the Docs is that we're appending an access_token.

Upvotes: 0

fabian
fabian

Reputation: 5463

I got a similar problem using the grpah api: This does NOT return the special post https://graph.facebook.com/MYPAGE/posts?access_token=SOME_TOKEN

If I call the graph via FB-Docs (they offer a special access token, i get the special post

https://graph.facebook.com/MYPAGE/posts?access_token=22223423470867|2.qnqX1HsEaIXVr0lVHCRxiw__.3600.12913423423400-10043534534530485|4wqk8YYWXQ8bjfQj8KETz2JyWQk

Stange...

Upvotes: 0

Related Questions