Using Facebook REST API to login, but meet 'Application does not have the capability to make this API call' - facebook

I'm a newbee on facebook development and I'm trying to do some basic feature on FB, just post a message to wall and upload some picture. This feature would be integrated into a game.
Now the problem is I HAVE TO use the REST API to login, using the url and parameters below:
https://api.facebook.com/restserver.php?method=facebook.auth.login&api_key=393870187360051&v=1.0&sig=d2985e6e3ac9fe3efe814d5c9c614f57&format=JSON&email=myfacebookaccount&password=mypassword
However I got the error 'Application does not have the capability to make this API call'
I have double checked that the FB app_key and account is correct, and the APP is bound to the account already.
I don't understand what that error message means. Do I miss something when calling the request? or this REST API is already deprecated? I doubt it because I find no reference about the METHOD facebook.auth.login on the official website now.
PS. I use the REST API in that way BECAUSE I must use some company internal API, which implements the login request like that above. If that method is already deprecated, I need to ask the guy to upgrade the API.
Thx so much

In case of someone who still need to play around with the Facebook legacy REST APIs, please take note that the REST API is not supported for newer Facebook app.
For details, refer here.

Related

Why doesn't this Facebook Graph API endpoint require an API key?

Why does this URL/endpoint work without any credentials? I can't find any information on it on the Facebook Developer documentation. Is it safe to use for a production application? Does anyone know what the limits are on it?
https://graph.facebook.com/?id=https://stackoverflow.com/&fields=og_object%7Bengagement%7D

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.

facebook API permissions

Just starting out with Facebook's API. I have a client that sends me the access_token after logging into to FB on iPhone. I am wondering where I would specify the permissions I need, for example to access email, or user's music data?
Is it via client using FBSession, or via Koala (ruby gem I use on server side with access_token to get user's info) or in Facebook's app settings page?
Thanks
If your user is logging in via an iOS app, you need to request them in the permissions parameter of FBSession. https://developers.facebook.com/docs/reference/ios/3.1/class/FBSession#permissions
Although I'm not a specialist in mobile development, so I cannot provide you with a functional example (or even properly explain how to do this) I have done a bit of browsing in the Facebook API section of the Developers website, and I believe that I have the answer to your questions. This will not only answer where, but it should also give you how, for many different purposes, there are different permissions that you must add, and this page gives you some idea of how to do all of them.
http://developers.facebook.com/docs/reference/login/

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!