PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, March 6, 2022

[FIXED] Facebook Fan Page API /home

 March 06, 2022     facebook, facebook-graph-api, facebook-page, facebook-php-sdk, permissions     No comments   

Issue

I am trying to get get the /home endpoint for a fan page using the Facebook API, but it returns this error:

Array
(
    [message] => You can only access the "home" connection for the current user.
    [type] => GraphMethodException
    [code] => 100
)

I tried using:

  • The AuthToken of the page that I get from Facebook API using /accounts
  • The AuthToken of the parent account that has rights to that page

None of them work, returning the same error every time.

NOTE: it works fine if I try to get the /home of the parent account and using its AuthToken.

Any ideas?

Thanks!


Solution

You need to use the

GET /{page_id}/feed 

endpoint (https://developers.facebook.com/docs/graph-api/reference/v2.0/page/feed/).

There's no /{page_id}/home for pages, see https://developers.facebook.com/docs/graph-api/reference/v2.0/page/#edges



Answered By - Tobi
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing