Where do I find my Facebook Audience ID? - facebook

I need to get the audience ID from the audiences I created in Power Editor but I can find no way to retrieve the Audience ID. I've read https://developers.facebook.com/docs/reference/ads-api/custom-audience-targeting/ but still it does not explain where to get these Audience IDs from.

I'm assuming your app has access to the Ads API; if not, you can't retrieve the Audience IDs via the API, but the IDs probably aren't useful unless you're creating ads via the API anyway
To retrieve audiences you've created in an account via power editor or the API, you can make an API call to https://graph.facebook.com/act_<ACCOUNT ID>/customaudiences which returns the audiences in the account
You'll need a user access token for an admin of the ad account, whcih has the ads_management extended permission

It's possible to get the audience IDs via web interface. Here are the steps:
select an ad set with the audience you need
press Export & Import button
choose Selected
Facebook will generate a .csv file. In this file, you'll find all ad set's parameters, including Included Custom Audiences and Excluded Custom Audiences with IDs.

Once you have a list of all the target audience profile URLs, you can get their Facebook ID numbers by going to www.findmyfacebookid.com
Or you can also find anybody’s ID by adding the word “graph” to their profile URL, like this http://graph.facebook.com/awesomename

Related

Facebook Marketing API Custom Audiences - Where/How do I collect EXTERN_ID value?

I have an existing Facebook Marketing API Custom Audience integration where I push contact information for matching and it is working appropriately.
I would like to be able to target facebook users via offline website traffic segments, using the Custom Audience EXTERN_ID field.
I have yet to find a place that explains where/how to collect/set the EXTERN_ID when someone visits my site, so that I can target them later. Can I pass EXTERN_ID in the Facebook Pixel call?

Facebook Marketing API: Is User in Audience?

Is there a way using the Facebook Marketing API (or GraphAPI) to verify that a given Facebook user (FBID given) is in an audience?
No, there is no way to know that someone is in an audience as this would expose information about that person.
However, you can create a Custom Audience using app scoped user IDs, and in this way you would have high certainty that the person is in the given audience.

Add extended permissions - Facebook

I created a Java program that retrieves users personal information and posts. I can retireve everything related to me but not to my friends.
I know that i have to add some extended permissions to collect information about my friends (e.g. friends_groups, friends_interests, friends_subscriptions and more) but i don't know how to add them.
I didn't use Facebook Api in my Java application. I just give a specific URL, for example :
https://graph.facebook.com/friendID?access_token=MY_ACCESS_TOKEN_HERE
and i get a JSon Object from this URL which contains the information of that user (id, first_name,last_name,link,name,updated_time) which are not useful for what i want to do.
I also tried :
https://graph.facebook.com/friendID?access_token=MY_ACCESS_TOKEN_HERE&scope=friends_activities,friends_birthday,friends_status,friends_subscriptions,friends_work_history
but again it didn't work either to my Java App or Graph Api Explorer.
Can someone explain to me how to add the extended persmissions that i need provided that i created my app in the way i explained above? Can i add the permissions inside the URL that fetches the JSon Object?
To get a person's data, your app needs to use that person's access token. To get that person's access token, that person must authorize your app (through Facebook Login). You can read more about Facebook Login in the documentation.

Quering connection of Custom Audience to Ad Groups in Facebook Ads API

What is the best way to get the Ad Groups using a Custom Audience in Facebook Ads Api?
Ads API provides a way to query connections for most objects. For example you could get all Ad Groups of an Ad Set by GET request to https://graph.facebook.com/{ad_set_id}/adgroups. I couldn't find something simular in documentation of Custom Audiences.
I could query all Ad Groups of Ad Accounts the Custom Audience belongs to and check the targeting field of Ad Groups. But this would generate a lot of requests to facebook API which isn't in my and facebooks interest. Isn't their a better way to get this information?
In particular I like to know which Custom Audiences aren't used in any Ad Groups anymore. I have to delete them to not getting problems with limit of 500 Custom Audiences per Ad Account.

How can I integrate profile information of Facebook group members on an external website?

the question is in the title.
I have been assigned to find out if the following is possible:
I create a group on Facebook. Selected people become members.
On a external website, I want to display all group members with their basic info - picture, name, link to public profile.
I have skimmed the Facebook Dev pages, and so far it seems to me that this is not possible simply with Social Plugins. Do I have to write some sort of App for Facebook? It came to my mind, that there should probably some permission from the group members to display them, is that right? But this probably does only work with an App, not a group. So do I have to create an App and use the Graph API to include the data on the website?
Yes, you will have to create an app. The facepile plugin will show faces, but I do not believe you can target a group with it.
It should be a reasonably straightforward app to create: you will need the user_group permission and I believe that would be it.
If the group is public, just access it by going to https://graph.facebook.com/groupid and to get the members, access https://graph.facebook.com/groupid/members
If the group is private or closed, you will need to create an app so that you can get an access token. Look at their authorization documentation on that (you will probably need to create a temporary dummy website to do the redirects to Facebook and record the token then grant you). You will probably need offline_access to run the call over and over.
With that access token, access the groups api using the url format posted above and with the access_token appended as a query string parameter.