Cannot find realtime updates panel in the new App DashBoard - facebook

Where can we configure "Subscribing to Realtime Updates" in the new App Dashboard ?
It looks like the following documentation is not aligned with the new App dashboard
https://developers.facebook.com/docs/graph-api/real-time-updates
thanks

Payments and Payment subscriptions objects are appears in "Orders" tab: https://developers.facebook.com/x/apps/__appId__/payments/
But you can't configure actions field (oO)
For configure those fields and other objects, use Graph API.
For example, graph api explorer https://developers.facebook.com/tools/explorer
set type to POST
remove access_token input's value
set url __appID__/subscriptions?access_token=__appID__|__appSecret__&object=payments
add field:
object: (subscription object - user, payments, permissions, etc)
callback_url: your_url
verify_token: your_token
fields: (for payments actions,disputes are required)
Update: found, that this, old URL is still work:
https://developers.facebook.com/apps/__appID__/realtime?ref=nav

Related

Facebook Api search users by name returning empty data

I used this url with access token https://graph.facebook.com/search?q=Marcus&type=user&access_token= and it returns empty data data []
Settings https://i.imgur.com/6hEiO5y.png
I was trying to get a list of users with their name using javascript. Is it possible ?
as mentioned in the comments here is the official Facebook note, that you cannot search for type = user anymore:
https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#search-4-4
The /search endpoint for pages, videos, groups and events has been disabled by facebook after the cambridge analytica scandal.
Faceboook Changelog:
You can no longer use the /search endpoint with the following object types:
event
group
page
user

Facebook Attribute Mapping with StormPath to retrieve the Facebook ID

This is driving me cray. I am trying to retrieve the Facebook id after logging in. I am assuming I have to use the attribute mapping in order to achieve this? Any thoughts?
Heyo, Just thought I'd reply here too in case anyone else has questions about this.
I looked at the Facebook scopes reference page, and it says that public_profile is the scope that contains the user ID. So, I went to my Facebook Directory, and under 'Provider Configuration' on the 'Scopes' tab, I added public_profile. Under the 'Attribute Mappings' tab, I added id as the Attribute Name and set customData.id as the 'Stormpath Field Name'.
When users log in to my web app using their Facebook credentials, their ID is saved directly to their account's customData:
{
"id": "1260737122323"
}
To grab this data from the Account's customData and display it on the profile page of the React-Express sample project, you need to do two things:
Ensure that the web.me.expand.customData config is set to true in order to have the custom data fields populated,
Add a new field on the profile page with name="customData.id", like this:
This is covered in the docs under the Access custom data fields by prefixing field names with customData section.
The documentation of these Facebook scopes is a little confusing, the properties on "public_profile" are actually available on the root of the Facebook user object, so in Stormpath you want to map id to customData.public_profile.id.

Facebook Graph API - Events ticket_uri

I am trying to add a ticket_uri to the event that I am creating.
I enabled the "Events Timezone" migration in my app settings.
I am posting on behalf of a user that is manager of the page.
Currently it's not working when I create a new event. The new event has no ticket uri.
If I update the new event, just after it's created, the ticket uri works...
Is this a bug or am I doing something wrong?
$fbEvent = $facebook->publish('/events', $event);
if(isset($fbEvent['id']))
{
$facebook->publish('/' . $fbEvent['id'], array('ticket_uri' => 'http://lowiebenoot.be'));
}
Updating right after it's created is just stupid...
You must get a "Page access token" and then post to {page_id}/events. Here's a copy of the steps I've posted a couple of places:
Enable the "Events Timezone migration"
Log into FB as a user that has admin rights on the FB Page that we want events posted to
Use the APPLICATION's ID to build this link to authorize the
managing of pages
https://www.facebook.com/dialog/oauth?client_id=MY_APP_ID&redirect_uri=MY_SITE_URL&scope=manage_pages,create_event&response_type=token
Exchange token for perm (longer token)
https://graph.facebook.com/oauth/access_token?client_id=MY_APP_ID&client_secret=MY_CLIENT_SECRET&grant_type=fb_exchange_token&fb_exchange_token=(token from step 3)
Visit this page, find the PAGE you want to post and copy the new
access_token https://graph.facebook.com/me/accounts?access_token=
(token from step 4)
Use this last token (from step 5) and the PAGE's ID to post to post
the event per the instructions at
https://developers.facebook.com/docs/reference/api/page/#events
Note that if you create a lot of events, you will "spam" every user who Like'd the page. FB recently added the 'no_feed_story' option to prevent this.

Facebook graph API returns false for existing and public event

There is a public Facebook event, for example: http://www.facebook.com/events/197276753679964/
I want to get information about this event using Facebook graph API.
I'm using this query url: http://graph.facebook.com/197276753679964
Facebook returns "false", but event is existing and public, so what's the problem?
There are a few more events with this annoying behaviour, but other ~95% I can read succesfully using FB graph API.
If the event is owned by a group or page which is restricted demographically, you can only access that even with the access token of a user who can see the event / page.
(this appears to be the case with the example in this question)
In general (one current bug excepted), 'false' means a privacy check failed

retrieve events where uid is the creator and application id is the admin - Facebook API

I would like to know if there is a Facebook API call to retrieve the events (eids) for all the events a user has created using my facebook connect application.
The events are created using the following REST api call:
https://api.facebook.com/method/events.create?event_info=' . $e_i . '&access_token=' . $cookie['access_token']
$e_i is the event info array where the 'host' value is set to 'Me' as follows
$event_info['host'] = 'Me';
On Facebook events under the "Created by:" section it lists "My user name,Application Name", I presume this is because I am the creator and the application is the admin as stated in the REST api documentation http://developers.facebook.com/docs/reference/rest/events.create/
Unfortunately I cannot seem to find out how (neither REST nor GPRAPH API) to return a list of events where I am the creator and the application is the admin as in the above scenario. If this is possible I would really appreciate some assistance with how it is done.
So far I have tried:
REST API events.get using uid=application_id. This only returns events created by the application not those including the user who created them
GRAPH API https://graph.facebook.com/me/events?fields=owner&access_token=... this returns all the events for 'me' but not where the application is also the admin.
It seems strange that there's no reference to the linkage between the event creator and the event admin through the API but in Facebook it is able to pull both and display them on the event details.
If you're using the Graph API try calling $facebook->api('/App ID/events') which should return all events managed by the application (http://developers.facebook.com/docs/reference/api/application/).
Later on you can check the creator's ID and compare it with the User ID.