What choose Instagram Graph API or old API - facebook

I wonder if it is possible to use a new Instagram Graph API only for hobby purpose(small java application). The main aim is to process only user's data that is currently log in on instagram(not other's user data). Generally I'm a beginner on this field and I try to determine my chances for writing this kind of application, because I've read that sometimes it is hard to get permission to API from facebook, so maybe somebody know how it works in practice?

From what I can tell on the docs site, the Graph API is only used if you're making something for Business Accounts. The docs say that if making something for non-business users, to use the old API.
Reference here: https://developers.facebook.com/docs/instagram-api

I personaly suggest you to use new graph API, because older API support may be disabled in future and might be deprecated in future.
Moreover, Facebook does not give permission easily but you give proper & exact content if allows you and provide great support.

Related

Instagram API deprecation 2020

I'm building an app that has the user log in through instagram, it then reads their feed and uses that information for the app. Instagram has a page that says their API's will be deprecated in 2020 but some things will still work. It's not straightforward as to what is being deprecated and what isn't, and I have not found any way to contact them directly. Does anyone know if the following URL will continue working, and if not if this type of app will even be viable in the future? Why is IG and Facebook becoming much more closed platforms to 3rd party integrations?
https://api.instagram.com/v1/users/self/media/recent/
Deprecation notice:
https://www.instagram.com/developer/
The legacy Instagram API - https://www.instagram.com/developer/ will be deprecated in favor of Instagram Graph API provided by Facebook - https://developers.facebook.com/docs/instagram-api
In order to use https://api.instagram.com/v1/users/self/media/recent/ this endpoint you need Basic permission. As documentation says, it will be deprecated in early 2020, which means that the legacy API will be most probably shut down, since there will be no more capabilities to request for.
You should most definitely start building your app with Graph API. Please keep in mind that it takes some time before you can go live with your app. It requires couple of things like Business Verification, review of requested permissions in App review and it can take some time to be able to go live.
Please keep in mind that the Graph API works only for Instagram Business type of accounts. You can't use it for regular accounts at the moment. It is not clear yet if it will be available for all accounts, but most probably it will be in the future. It was the same as with deprecating Public Content permission on Instagram legacy API. They added similar functionality in Graph API.
If you plan to support all users, you will also have to apply for Basic capability in legacy API. In other words, you need to support both Instagram API and Instagram Graph API if you plan to target all Instagram users, both regulars and Business profiles.
Another thing to keep in mind is that you can't really report bugs or get any help from legacy Instagram API. If you will find the bug you can't report it as they do not accept it due to deprecation.
So start building with Instagram Graph API, once you will be good to go, try to add Instagram legacy API support. If everything will be fine and Facebook will add support for legacy accounts, your Graph API should easily take over Instagram legacy API functionality.
Most probably the reason why they are tightening the integrations and makes it harder for the developers is user privacy. They do not want to have yet another incident like Cambridge Analytica for instance.
It does not make sense to build something with the old API, that old API URL will definitely stop working (with all the old api.instagram.com endpoints). There is a new API though: https://developers.facebook.com/products/instagram/

Facebook Marketing API - no app?

I want to pull ad data (campaigns, ad sets, & metrics like clicks/impressions/ctr) from Facebook using their API and put it into a database. Facebook's documentation says I need to create an app on their site in order to access the API, but that doesn't seem right. I'm not trying to create an app for my fb page, just want to extract data.
My first choice was to use an ODBC driver from
CData
, which does allowed me to successfully pull data from AdAccounts but threw an error when trying to get AdSets or AdStatistics:
OAuthException Code 10: You do not have sufficient permissions to perform this action.
I made sure to add in a target='act_{myAdAccountId}' parameter to the query, as per their documentation, but it didn't help. I figured this meant I didn't configure the driver properly, so maybe I'd have better luck just coding up a solution in python or php.
Next, I tried to run similar API calls using the Graph API Explorer and got the same error message. I created an access token that had all the extended permissions and then made a request to
GET /v2.4/act_{myAdAccountId}/adcampaigns.
This gave me the exact same OAuthException Code 10 error that I was getting through the ODBC Driver.
Can someone confirm whether it's possible to pull data from the API without building an app? If so, what permissions do I need to enable for my account? I'm already an Ad Account Admin in the "Ads Manager", and couldn't find anywhere else to set permissions.
Thanks!
Apps have no direct relation to Pages. You need to create an App for any API access. I did not use the Ads API yet, but i assume you need to use the ads_management permission with your App.
How to create Apps and authorize with the required permissions is explained in the docs: https://developers.facebook.com/docs
Since you asked about Login Review, all the information you need about that can be found in the docs too: https://developers.facebook.com/docs/facebook-login/review
I understand this is an old post, but in case if anyone was looking at a similar situation, I was able to call the Facebook Marketing API without building an app.
I posted a similar answer on another more recent question (Do I need a publicly accessible webserver in order to user Facebook's marketing API?), and was curious if this situation puzzled anyone else, which led me to here.
I wrote my API calls using Python 2.7 on Juypter notebook, and I just followed Facebook's Marketing API documentation and examples, modifying with my access tokens and account information.

Access user's event invitations

I am developing an application which would allow a user to better manage their events. However, after reading Facebook's Graph API, FQL and Legacy REST API documentations I did not find a way to obtain the events to which a user has been invited but not yet responded.
Is there any possible way to achieve that?
For some reason this is not covered in the Facebook API docs, but doing a query on the /me/events/not_replied graph path does the trick.
/me/events/{declined|maybe|attending} also work as filters on the /me/events path and pretty much explain themselves. Interestingly enough those three are included in the default /me/events but the events from /me/events/not_replied are not.

Using both Facebook Graph API and Old Rest API? Please help!

I am developing a Facebook application that will use Facebook events.
I want to be able to create and edit event as well as invite users friends to the event.
I prefer to use the new Graph API to handle all connections with Facebook and I many ways I am able too, but, the Graph API cannot send invites.
I saw that the Old Rest API got far more ways to interact with Facebook so I tried to use both systems on the same time but when I send the Access token that I have created with the Graph API a long with a call to the old API it says "Invalid OAuth 2.0 Access Token".
My question is, is there a way to convert the new Graph API access token to be used with the old rest API? Is there perhaps another way to get both systems to work in the same application?
Please help! All input are welcome.
I´d recommend against the old REST api. Support will be canceled sooner or later and then you will have to port to graph api anyway.
To send invites to your app you can use fbml/xfbml. try the http://developers.facebook.com/docs/reference/fbml/multi-friend-selector togehter with the JavaScript SDK as described here: http://www.takwing.idv.hk/tech/fb_dev/jssdk/learning_jssdk_11.html
good luck!

How to crawl Facebook based on friendship information?

I'm a graduate student whose research is complex network. I am working on a project that involves analyzing connections between Facebook users. Is it possible to write a crawler for Facebook based on friendship information?
I looked around but couldn't find any things useful so far. It seems Facebook isn't fond of such activity. Can I rely on the Facebook API?
Update (Jan-08-2010): Thank you very much for the responses. I guess I probably need to contact Facebook directly then. Cheers
Update (Feb-16-2011): A new book, "Mining the social web", just came out. In it, there is a chapter devoted entirely for mining Facebook using Python. Cheers.
You can't rely on the Facebook API unfortunately. To get friend information, you need to use something like friends.get(). However, any Facebook API method that returns user information like this requires that you have an active session key from that user, and generally the way you get an active session key is to have the user come to your Facebook application or page.
In summary, the information you are talking about is essentially private. You can't pick a person from Facebook, get their friends, and get those friend's friends, and so on. To me this is a good thing for privacy, but of course it prevents arbitrary analysis.
I'd throw out the idea of writing a quick and dirty application with some user appeal that you could use for research. If a group like S**t My Dad Says (funny, not really safe for work) can get 120,000 users in a couple of months, you could probably plead your case with a small research application and get a reasonable amount of users.
The problem is that facebook friendship information is typically private and only accessible to friends. It should be a lot easier to build this network on Twitter, if this is an option for you.
As others have stated, this is typically private information. If, however, Facebook per se isn't a requirement, you could use Google's Social API. A snippet from the Google Social Graph API page: "With the Social Graph API, developers can now utilize public connections their users have already created in other web services. It makes information about public connections between people easily available and useful."
Here's an article on using it in Ruby:
http://articles.sitepoint.com/article/google-social-graph-api-ruby-rails#
This lifecode post provide a basic python script to scrape your facebook friends contact info.
The output of this script, is the profile ID, profile pame, profile URL, e-mail address and mobile/phone number (if provided by friend).
WARNING: This is against Facebook TOS. Use at your own risk.
Info provided for educational and research purposes
http://ruel.me/blog/2010/11/26/scrape-your-facebook-friends-contact-info-with-python/
You can use http://www.facebook.com/directory/ to get the public listed people.