문제

In my app I want to create Facebook ads on behalf of a user. How do I discover via API if he has a FB Ads account and what's his Ads account id?

도움이 되었습니까?

해결책

Provided your app has access to the Ads API and you have the ads_management Permission you can retrieve the list of Advertising Accounts with a call to /<USER ID>/adaccounts

The response is an array of adaccount objects, documented here: https://developers.facebook.com/docs/reference/ads-api/adaccount/

다른 팁

You can use the facebook graph explorer to discorever this informations. you must specify the fields to pass to the facebook graph explorer. Example :

https://graph.facebook.com/{user_id}?fields=id,name,adaccounts

Also you can find using this http://rubygems.org/gems/zuck to retrieve all adaccounts/ads/account_id that specific user, just remember that you must have sufficient permissions to read this information and also need a token that has not expired .

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top