Luca Rasconi
Luca Rasconi

Reputation: 1105

create page programmatically for a test user

Can I create via api pages for a test users?

This is what I did: Given my app, I got the user's token from app dashboard test users and I tried to use it in the graph explorer (POST /user_id/accounts).

I've the error "(#10) Application does not have permission for this action". These are the permission the app has been granted for: manage_pages, publish_pages, publish_actions

Do I miss some permission or it is not possible?

Luca

Upvotes: 0

Views: 522

Answers (2)

Lily Beauvilliers
Lily Beauvilliers

Reputation: 11

[Edited following Simon's advice and the response below:]

I've been looking into this all day and it seems the answer is a solid, "Nope."

According to the developer documentation on creating pages, the {user_id}/accounts endpoint only supports Reading, not Creating, Updating, or Deleting.

Although apparently if you apply for Standard API access, you can receive permissions to create pages. (Only available if your app is generating ad revenue.)

Upvotes: 1

Luca Rasconi
Luca Rasconi

Reputation: 1105

Googling, reading and trying, I figure out that we can create a page via api.

https://developers.facebook.com/docs/graph-api/reference/page/#Creating

Applications with Standard API Access can create Pages through the API using the following paths: /{user_id}/accounts

So the answer to my question is yes, if your application has the Standard API Access, no matter if you are dealing with test users or not. Note that teh call is slow (about 5 sec.)

That's it.

Upvotes: 0

Related Questions