List of events in facebook - facebook

Is there a way to query all the events listed in facebook? I see all API's provide a way to query information specific to a user or by an Application ID but not sure if its possible to query generic data such as a list of all events listed in facebook by various users or businesses/organizations.

You can examine the connections between objects using the URL structure graph.facebook.com/ID/CONNECTION_TYPE.
here's an example from the documentation :
https://graph.facebook.com/me/events?access_token=2227470867|2.gGtACmeQGq51Pxqu8pGnlg__.3600.1298570400-590157628|NdIFut8zccPqJoVQHcfRGI5GX6A

Yeas,, You have to download the SDK from facebook
SDK: https://developers.facebook.com/
(SDK available for different platforms).
Create a facebook app in facebook for your site, it will generates an application id and application secret, using that details to configure the SDK. And you can now able to query the events db using the sdk and get events from facebook (Profile or a page).

Related

facebook application for login and messenger same ids?

I am building a facebook messenger bot. And the bot is giving user ids. But it is not clear to me if the messenger ids are the same ids that would be returned if I use the same app and add to it a login feature. Because we already have an app and has a login feature, now we need to build a facebook bot and identify the already existing users in our db that are using the bot.
I have read facebook tutorial about linking 2 different applications to the same business to get consistent ids. But what if I use that same application to login users AND for messengers (by using the add products to the application, and so having one application, one app id) would that work? Would I be getting the same user ids?
PS: I would test myself but I am in an awkward position where the page/database/login app owner is a different person, and they are not big on sharing data, and I am supposed to blindly write a messenger code that is supposed to work when they deploy it.
All help is appreciated, thank you.
You need to use Facebook's ID Matching APIs for this purpose:
Here is the details: https://developers.facebook.com/docs/messenger-platform/identity/id-matching

Fetch all app IDs I am an admin of

I want to fetch a list of the Opengraph and Graph apps that my account is an admin of. I cannot find documentation to perform such a task. Is this possible?
I am developing a tool to fetch tokens dynamically (which we will then use to make user-generated posts later). Currently, I have to paste in the AppID manually. I would like to make a dropdown of the current list of available apps to perform this task.
Edit~ This page of FB documentation suggests you can of course fetch a lot of information about an individual Application when you already have its applicationID: http://developers.facebook.com/docs/reference/api/application/
Instead, I would develop roughly this: 'Facebook, I have the access_token for this developer account, for which apps is this developer account an administrator' Response: 'AppID1, AppID2, AppID9'
You can access the lists of apps a use is a developer on by hitting 
/me/applications/developer/ 
or using the app_role FQL table with following query
select application_id from developer where developer_id = xxxxxxxxx
Thanks to davek804 for the query

How to find out which of your facebook friends are also using your mobile app?

We are building mobile app that uses Facebook for registration (know how to do this).
We would like to have a screen, where all your friends would be listed with indication, if they also use our app.
How should we save data (client, server) that one facebook user is also our app user?
When you're already using Facebook for authentication, you probably already have a column in the user table in your database that holds Facebook profile ids of each user. If you want to distinguish between them, just add a column modeling if that user is also using your mobile app.
By issuing a request to https://graph.facebook.com/PROFILE_ID/friends as described in the Facebook Graph API Documentation you can get the list of friends for a certain user without requiring any additional permissions.
Now just build the intersection between the friends list of the user and your (mobile app) user base and you got the list of his friends that are using your mobile app. You should of course do this comparision on the server, so you don't have to send the Facebook ids of your complete user base around.

Facebook Canvas App - Finding all users who have installed the app

How do I find out all users who have installed my canvas app ? Is there a UI on Facebook for it or do I need to query an API ?
See https://developers.facebook.com/docs/reference/fql/insights/#Metrics
You can check the application_installed_users value to figure out how many users have installed your app.
EDIT: this requires the use of the Facebook FQL interface, as covered at https://developers.facebook.com/docs/reference/fql/
It can't be done as per this - How to get all the user IDs of people who are using your Facebook application
I would suggest use you to use the depreceated REST API call once to save all the IDs of the users, and then add a new user to that list (keep on saving it in a db).

How to update facebook profile info from code?

Does someone know the API for updating user profile information on facebook?
I want for instance to change my location from my client application. Is that possible?
I am using Facebook C# SDK, but an example in any other language would be great.
I do not believe they support updating a user's profile information from the exposed Facebook API. The Graph API documentation currently states that only the following elements are editable (editable as in, you can create them):
Wall Posts (feed)
Object Comments
Likes
Notes
links
events
event status
albums
album photos
checkins
As you can see, the User object is not one of objects Facebook exposes for edit purposes. It does support the ability to publish location checkins, however. While this does not meet your goal of modifying the location attribute of a user's profile, it does provide some basic abilities.
POST https://graph.facebook.com/<profile_id>/checkins?
access_token=<access_token>
&coordinates={...}
&message=my+message
&place=<page_id>
&tags=<tag1>,<tag2>,...
See the checkin documentation for an example using curl. This example should be executable by any platform specific Facebook API (Java, C#, etc..).
You can't update informations from the API. All you can do is reading / searching / posting / deleting / analysing data.
You can find everything there.
Cheers