Open Stream API - facebook

I am wondering if there is a common mechanism for a third-party side to access to any social network data, and I found this social-networks connect services. In this article, they describe 4 stages for a third party to connect to a social network.
1) Identity Authentication: the third-party application can use the authentication services provided by social network side (e.g., OAuth) to authenticate users.
2) Authorization: the social network provide the permission for the third-party side to access its own data. (normally, social networks again use OAuth to manage the access right)
3) Streams: let third-party sites publish to users' activity stream and vice versa. (e.g., Facebook uses Open Stream API)
4) Applications: let third-party sites develop rich social features within the application scope (e.g., the third-party sides can use Graph API, FQL to update Facebook information)
My question is
1) Is it true to apply to any social network throughout this above mechanism?
2) I've read the Open Stream API that Facebook launched 3 years ago, and when I open Facebook API documents, I don't see it anymore. Is it true that Facebook is no longer supporting this api. Or in the case I misunderstood, is it possible to consider FQL, Graph API the same as Open Stream API in Facebook? or they are different?

Social Networking sites do not give direct access to their streaming data. For e.g facebook gives us public data access through it's Graph/Search API & FQL.
But for streaming data you may have to contact one of their authorized data re-sellers. They can give you one point access to all social networks you need.Datasift & GNIP are the two I remember on the top of my mind. I'm stuck at a similar point, you may also want to keep a track of my SO question which is on similar lines.

Related

Connect App Flutter with API instagrame Publish comment

I have a question about connecting my app, made with Flutter, with the Instagram API.
I want the user to register with their account, store the access token and then send a post to the API to publish a comment or add a like.
Can I do this with Flutter or do I need to use a different language like Python?
I checked the API documentation that Instagram provides and it seems that you can only do read-only requests (liking a post might not be possible).
The API you mentioned in your tags will not work with personal accounts, as Instagram states:
The API cannot access Instagram consumer accounts (i.e., non-Business or non-Creator Instagram accounts). If you are building an app for consumer users, use the Instagram Basic Display API instead.
You can try to use the mentioned Basic Display API instead, but mind you won't be able to author any posts or do actions in behalf of the user. To circumvent this, you might have to reverse-engineer the frontend facing portion of Instagram but I won't go into that.
To come back to your question, Flutter is well able to send network requests as mentioned here, but you still have a long way until you have functioning access to Instagram (check the Getting Started).

How to get user data now with restrictions on instagram platform api?

There have been lots of changes to the facebook api recently, which now includes the instagram api as well. https://www.instagram.com/developer/changelog/
They have shutdown a lot of endpoints way ahead of schedule and has created a huge problem for my application which integrates instagram user data. They have the instagram graph api now, but looks like it can be used only for business accounts (looked like that prima facie). Reading through the news past couple of days, I am really confused about what is available and what is not. My application used to get user data (number of followers, recent posts, reach, likes, etc) using the instagram handle provided by users. Since this is totally restricted on the platform api now, is there a way I can have the same functionality using the new graph api? Or should I look into 3rd party APIs? I am open to asking users for authentication (I already have the facility). Can the user information be fetched after they authenticate my app to do so?
You can use the following Graph API to get all the details for any IG business account.
https://developers.facebook.com/docs/instagram-api/business-discovery

Facebook public feed API

i'm working on project which mostly is a data-mining from social networks, so far, i've done twitter and it have really nice API, which allows me to pick an endpoint and recieve alredy filltered twits as streaming data. Now i'm working on a facebook, and there comes the question: with Graph API i would be able to get public feed of some definite page, but what if i would like to recieve posts from as many people as possible? Does Facebook Public Feed API works as Twitter's, and gives me data from as many sources as possible, or i missunderstood something?
Facebook has restricted public feed api usage and its now available only to handful no of teams: https://developers.facebook.com/docs/public_feed
Access to the Public Feed API is restricted to a limited set of media publishers and usage requires prior approval by Facebook. You cannot apply to use the API at this time.
You're look for the Facebook Search API. https://developers.facebook.com/docs/reference/api/search/
You'll need an app with a token to access these. Some might need higher permissions though, but the generic one will work to search commons actions types (post, places, etc) who're publicly available on the platform.
You won't be able to search for private publications. Unless you search user who gave you direct permissions to read their timeline (one by one).

How to simulate silent login to Facebook Graph API?

I'm working on an API that will aggregate data from several website, including facebook. The API has an engine that harvests data on regular intervals, and then the client app polls the API to get the data from all websites centrally.
The problem is that the API has no way of authenticating on the regular, behind-the-scenes harvests, as Facebook insists that the user has to click on the OAuth Dialog. With the short story being that there is no way to login to graph API silently this almost means that developing such an API is not possible (except for harvesting only public data).
However, I'm not easily satisfied by "it's not possible" answers and my clients - even less so. Accessing private information on demmand is defnitely possible as Facebook apps do that. For example, the official Twitter app posts on my wall whenever I tweet. I guess apps only need a permission once and then can access the user's profile as much as they like.
So this leads me to think that I should do a combination of a Graph API client and an application that talk to each other, and whenever the API needs to harvest - it asks the app to get the data and fetch it to the API. Or maybe it should be a push model (the app sends the data whenever it's generated) rather than pull (the API requests the data at regular intervals).
Am I on the right track? Is any of these the correct design approach?
I did some searching but it's very hard to find any useful discussion on the topic as whatever keywords I try I only find "Can I login silently? No" type of discussions.
You'll want to look into the offline_access permission. This lets you access a user's data when they don't have an active session, or are offline. That's as close to "silent login" as you can get.

OpenSocial and its usages

I have looked for some explanation on the exact usages for the set of standards known as OpenSocial.
I need some clarification if I can use OpenSocial like the following.
I would like to create one library used to community with an OpenSocial api for use in my website that will not 'behave' like an application described by common sites like facebook and myspace. I'm not making a myspace of facebook application, I'm creating my own website and I want users to be able to find friends.
I would like to allow users to store usernames and passwords for various OpenSocial-supported social networks. I would also like to use the api to sync events from my web site to their specified social network. I would also like to allow my users to view a list of friends and invite them.
Is it possible to create one library that supports OpenSocial and simple "point" to and social network that supports it to get a list of friends and etc?
Many OpenSocial containers (social networking sites) support REST and/or RPC methods which can be used to access friend lists, post activities, etc. Several client libraries have been written to work with these APIs (http://wiki.opensocial.org/index.php?title=Client_Libraries). It is possible to use the client libraries to create a site which allows you to sign in with an account on a supported OpenSocial network and obtain a list of your friends.
However, it is not possible to authenticate against an OpenSocial API by storing a user's name and password and sending it to the social networking site. This is considered a poor design pattern and is discouraged. Instead, OpenSocial supports 3-legged OAuth, which involves redirecting a user to the social network where they input their credentials and are redirected back to your site with a token which can be used to access the user's data.
Note that not every site supports 3-legged OAuth, although at least MySpace, iGoogle, hi5, and Netlog do right now.
Once authenticated, you will be able to fetch data from pretty much any network. Posting activities back is supported on some networks, but not all of them at this time.
This approach does requires you to register your website with each social network you want to support, which can be a scaling problem. To try and help this, Google released Friend Connect, which ties together OpenSocial APIs from various networks to give you one interface which is easier to program against (full disclosure: I'm a Google employee and work with Friend Connect from time to time). I gave a talk at Google I/O this year describing such integrations with a website which may be of help. (Since I'm currently limited to posting a single link in my posts, it's up at http colon slash slash code.google.com/events/io/sessions/BeyondCutPasteGoogleFriendConnect.html)
I'm happy to elaborate further if you have additional questions.