How to add Ad id to Facebook URL - facebook

we want add to Facebook URL a parameter that send the Ad-ID (unique id Facebook generate).
Its actually a dynamic parameter which get different ID per Ad.
is this possible ?

Related

Messenger Bot: how to get id, name and user's profile picture url?

I have Messenger Bot and want to do this action.
User click Button Template(URL) .
Messenger opens new tab
On Web app header display header with fullname, display Picture
All these data are public data ex: user fullname, picture url to display.
I know can use Graph API with USER_ID,
BUT In Messenger Bot can get only SCOPE_ID, so it cannot be used in graph api.
Any way to achieve like this
and No login required.
In order to use the User Profile API, you can make a GET call to
https://graph.facebook.com/v2.6/<USER_ID>?access_token=PAGE_ACCESS_TOKEN
<USER_ID> is the page-scoped ID PSID that returned with any messaging object

Why I am request email scope for oauth, Facebook also show I need to access friend list?

I am integrating Facebook login in my web app, and I was able to generate a redirect url like..
https://www.facebook.com/dialog/oauth?client_id=xxx&redirect_uri=https%3A%2F%2Fexample.com%2Fauth%2Fcallbacks%2Foauth2%2F%3Fhauth.done%3DFacebook&state=xxx&scope=email&display=page
As you can see, my requested scope is only email.
But when I redirected to FB, I am seeing..
xxx would like to access your public profile, friend list and email address.
I don't want to scare my users, is it possible not to show friend list request?
With reference to : Permissions- Basic Info (Default)-
Basic info is part of every request for permissions. It includes several elements from a person's public profile and a list of their friends.
A person's public profile refers to the following properties on the user object by default:
id
name
first_name
last_name
link
username
gender
locale
age_range
Other public information
The friend list is the friend list node on the user object.

How to get Facebook profile using Facebook API with email id as parameter?

I am developing an RCP application that takes an email ID and displays the Facebook profile associated with it in a view using the instance of Browser class. Does Facebook API provide such an option for searching by email id?
Facebook's FQL User table only has uid, username, and Name (user's full name) as indexable columns. Searching by an email address is not supported by Facebook's public API.
FQL User Table Documentation

Generate Facebook user picture using third_party_id

I've had a look through Facebook's online documentation and cannot find a way to manually construct a Facebook user's profile picture Uri using the user's third party ID (third_party_id) field.
For example (doesn't work):
https://graph.facebook.com/<FACEBOOK_THIRD_PARTY_ID>/picture?type=square
http://developers.facebook.com/docs/reference/api/user/
third_party_id: An anonymous, but unique identifier for the user; only returned if specifically requested via the fields URL parameter
Using Facebook ID:
Using the user's Facebook ID to retrieve their profile picture image Uri works:
https://graph.facebook.com/<FACEBOOK_ID>/picture?type=square
For example (works):
<img src="https://graph.facebook.com/568916752/picture?type=square" />
Using Facebook Username:
Using the user's Facebook username to retrieve their profile picture image Uri works:
https://graph.facebook.com/<FACEBOOK_USERNAME>/picture?type=square
For example (works):
<img src="https://graph.facebook.com/brett.scott/picture?type=square" />
Facebook Third Party ID:
Best practices suggests that I store the user's third_party_id instead of the user's Facebook ID (id) in my database. I shouldn't be publicising a user's Facebook ID to other user's of my website. The reason? Because once a user can see another user's profile picture Uri, which contains their Facebook ID, they can find the other person's profile (see example below). I'm sure there's other reasons too.
Load profile picture:
https://graph.facebook.com/brett.scott/picture?type=square - or -
https://graph.facebook.com/568916752/picture?type=square
Then any user can load the above user's profile:
http://www.facebook.com/brett.scott - or -
http://www.facebook.com/568916752
I do not want to make a request using the Facebook Graph to obtain each user's profile picture Uri picture because it's too slow. If there are 20 Facebook pictures on a page, that's 20 HTTP requests back to Facebook's servers. I'm aiming for zero.
Is there another way to obtain a Facebook user's profile picture using their third_party_id or is it a missing feature?
https://graph.facebook.com/<FACEBOOK_THIRD_PARTY_ID>/picture?type=square
For example (third_party_id generated for my application):
https://graph.facebook.com/0u0JrPIriHa3fgEDostj7v8dbdo/picture?type=square
The Third Party ID is a unique, but anonymous identifier. It is meant to allow an advertiser to track unique users. It is specifically designed to NOT be resolvable to a Facebook ID.
For your site, you can store Facebook user ids in your database without violating the TOS, so long as you keep that data private.
When you request a photo from the Graph API, Facebook returns a CDN URL to the photo. You can publish that URL. You aren't supposed to store this data for longer than would be expected in a cache.
To get 20 pictures in one call, you can call the endpoint:
https://graph.facebook.com/picture?type=square&ids=UID_1,USERNAME_2,...UID_n

Is it possible to get a name from Facebook's API using an email?

Like the title says, if I have e-mail address, can I retrieve the person's name using the Facebook API?
No, you can not retrieve a user's name from their email using the Facebook API.
All values that end in a * can be used to search for users. They are uid, name, and username.
However, if you get the user to manually authorize a facebook application that you create then you will be able to access the user's UID and you can use that to get their name.