Facebook integration in android studio to fetch friends Facebook Id - android-studio

[sample code to fetch (Facebook friends id) in android studio using Facebook API.please provide some links]

according to new sdk facebook returns the person's friends who also use the app.
If you want to access a list of non-app-using friends, there are two options:
If you want to let your people tag their friends in stories that they publish to Facebook using your App, you can use the /me/taggable_friends API. Use of this endpoint requires review by Facebook and should only be used for the case where you're rendering a list of friends in order to let the user tag them in a post.
If your App is a Game AND your Game supports Facebook Canvas, you can use the /me/invitable_friends endpoint in order to render a custom invite dialog, then pass the tokens returned by this API to the standard Requests Dialog.

Related

How to access Instagram Graph API and use Instagram webhooks?

I'm trying to create an app in which I would like to display user feeds from social media apps like Instagram. I want the data to be as live as possible so I tried to integrate Instagram Webhooks. I have created a server side application with Instagram's authentication and a callback url for webhooks through which I want to fetch data from Instagram and then store it in a database.
I have been going through the Official documentation. I was able to get User id, name, comments through Instagram API and I have also subscribed Instagram's webhooks in my meta developer's application. It didn't throw any error but when I like or comment on my post I couldn't get any object in the callback URL. I'm completely new to this so It would be great if someone could explain me how to do this?

Does Instagram API support get followers list and more?

I am working on an app, which does the below:
A user logins using instagram User creates content and shares it with a subset of her instagram followers ( say 3 out of 200)
Those 3 users get a message in their insta inbox and can click on a link
and sign up on our app.
I am trying to find Insta API documentation, but I am unable to. Can someone experienced with Insta API's please guide to me to specific parts of the Instagram API documentation which can do What I am imagining?
Thanks
The thing that you are trying to create is not possible by using official Instagram APIs. None of the APIs returns the list of followers for given user. It is also not possible to send a Direct message via Instagram API.
https://developers.facebook.com/docs/instagram-api here is the introduction to Instagram Graph API. Right on the top of that page you will find possible use-case scenarios.
There is also more limited Basic Display API which documentation and possible use-cases you can find here: https://developers.facebook.com/docs/instagram-basic-display-api

How do I post as different users in react-activity-feed component using the same token?

Our Use case is Anyone can create a site in our platform bit as Wix lets say. Each Site has its own Community & Chat.
So I used my appId, secret key to create the user session token for the user of the site1 says site-1-user-1 for displaying the community of site1.
I used react-activity-feed components to display the timeline feed of user site-1-user-1 (timeline:site-1-user-1)
I also displayed status update from above the activity feeds using react component. So when I post in this status update form, the activity gets displayed as by site-1-user-1.
How do I post activity as a different user say site-1-user-2 using the same token? I want the timeline feed with status update form to be displayed as a discussion forum where any logged in user can post any topic and see other activities also.
I am able to do this using PHP and getStream SDK.
How is it possible by using the react component?
Stream restricts actions user is able to perform when using client-side tokens:
User is able to read any feed
User is able to make feeds with her user-id follow any feed
User is able to post to feeds with her user-id
Client side tokens can only be used to perform the actions as the user the token was created for.
If you need to be able to impersonate other users or post contents for users to feeds they have no access to you will have to user server-side stream api

Is there a way to push notification via a chatbot deployed in facebook developed with dialogflow w/ node.js for fulfillment

I'm developing a facebook/workplace chatbot using dialogflow with node.js for fulfillment. Can't seem to find resources for pushing notifications.
I want to be able to trigger sending the message by visiting the webhook url.
You need to use the Facebook Graph APIs to send a facebook notification to a specific user. User can click on the notification to launch the facebook messenger chatbot.
Here is a quick example.
https://graph.facebook.com/v3.0/{user_id}/notifications?template={your_message}&href={link}&access_token={page_access_token}
You can read more about it here: https://developers.facebook.com/docs/graph-api/reference/user/notifications/
Basically, you need to run a web service which when called makes the calls to the facebook notification APIs.
All you need to do is pass the user id, the message/link to be displayed in the notification and the page access token.
When someone first sends you a message via Facebook, Facebook provides you the page-specific user id which you can store in the database.
Page access token can be accessed by going to https://developers.facebook.com/apps

Can I get likes by specific user using Instagram API?

Can I get likes by specific user using Instagram API? I saw this in Windows Phone app, but I can't find it in API docs.
Is it possible?
If I understand this correctly, you wish to get the most recently liked photos of a particular user.
This can be done using the Instagram API - but only when that particular user has authenticated your app.
You can use the following endpoint:
GET /users/self/media/liked
Here the API call would be :
https://api.instagram.com/v1/users/self/media/liked?access_token=ACCESS-TOKEN
This will give you the list of recent media liked by the owner of the ACCESS-TOKEN.
More details on the Instagram API here :
https://www.instagram.com/developer/endpoints/users/#get_users_feed_liked
Unfortunately no, you can't.
This feature is only available on the Instagram app following this steps
To view the 300 most-recent posts you've liked, go to your account
settings in the app and then tap Posts You've Liked. You won't be able
to view posts you've liked on the web.

Resources