How to read your own facebook inbox using python sdk? - facebook

Can someone suggest how to read the facebook messages using the python SDK with Graph API's.
I know how to read messages from pages.But i want to know how to read messages from my account itself

That is not possible any more.
https://developers.facebook.com/docs/apps/changelog#v2_4_deprecations:
90-day deprecations (effective Tuesday, October 6, 2015)
The GET /v2.4/{user_id}/home, GET /v2.4/{user_id}/inbox, and GET /v2.4/{user_id}/notifications operations as well as read_stream, read_mailbox, and manage_notifications permissions are deprecated in v2.4.
Those endpoints and permissions have been removed for all apps on said date; there is no replacement.

Related

Is it still possible to post Follow/Unfollow from Instagrams's API?

I've searched through all of the documentation from Instagram's APIs and I can't find a single mention about posting unfollow / follow. If you could point me in the right direction I would very much appreciate it. Thank you.
This endpoint was available I believe through the legacy Instagram API. However, that was decommissioned a year and a half ago. The replacement Instagram Graph API did bring over these endpoints but they have been decommissioned as well. So I'm afraid it's not possible to follow or unfollow an account using the Instagram API.
https://developers.facebook.com/blog/post/2018/01/30/instagram-graph-api-updates/
Instagram API Platform: Deprecation
We will be deprecating the older Instagram API Platform in three phases with complete deprecation occurring in early 2020.
The following will be available until July 31, 2018:
Follower List - to read the list of followers and followed-by users
Relationships - to follow and unfollow accounts on a user’s behalf
Commenting on Public Content - to post and delete comments on a user’s behalf on public media

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/

is it possible to read group feed by using facebook group api? (after 4 april chage)

Is it possible after the changes of 4 April, to use Facebook group API in order to read the feed?
Until 4 April i did it via Graph API EXPLORER by using GET request like:
v2.12/{Group-id}/feed
using user access token.
This is not working for me anymore.
The service is no longer available or I do something wrong?
https://developers.facebook.com/blog/post/2018/04/04/facebook-api-platform-product-changes
Testing of our more robust process starts today and the new process
should resume in a few weeks, but apps currently accessing Events and
Groups APIs will lose access today.
The feed will just not return some fields anymore, you can read more about it in the changelog: https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#groups-4-4

Access education/work data from Facebook Graph API

Facebook recently (4th of April) deprecated the education and work nodes on the user object in their graph api.
I am creating an app which requires a user's previous education and work experience. The only data I really need is name of the institution/place of work and dates that the person was there.
I can't see anywhere in the changelog how to access education and work data now. Is it still possible to access that data and if so, how?
If it is not, do you know if support for getting this data is going to be re-added?
As of April 2019, there's no way to retrieve that information.
There's no mention in the documentation or the changelog why the API was removed, but looking at the timeline it could indeed be related to the Cambridge Analytica scandal.
This node is deprecated
https://developers.facebook.com/docs/graph-api/reference/education-experience/
This node has been deprecated as of April 4, 2018 and will return no data. Please see the changelog for more information.
Deprecated Permissions — The following permissions are deprecated: [...]
user_education_history

How to use FQL in newer Facebook apps (created after 7th August 2014)?

I want to use FQL for my app because the newer Graph API does not yet have support for what I want to do. For this, I came to know that my app must be created before 7th August, 2014 (here and here). The apps created before that date can still use FQL while Graph API is not yet suitable for all needs.
However, I don't have any apps created before that date which I can use to run FQL queries. Even while creating new apps, we don't get an option to specify its api version. How do I use FQL in newly created apps?
PS: I want to fetch all messages in a conversation with a friend while enforcing some constraints. There is a simple FQL query for doing this while I was not able to achieve this using the newer graph API.
Short Answer: You can´t use FQL in newer Apps, there is no workaround.
But there is something else that may be important for you, for fetching messages you would need to use the read_mailbox permission, and you would need to get it approved in order to make it available for everyone. Without approval, it will only work for users with a role in your App (Admin/Dev/Tester). And read_mailbox only gets approved for platforms without a native Facebook experiece:
https://developers.facebook.com/docs/facebook-login/permissions/v2.2
This permission is granted to apps building a Facebook-branded client on platforms where Facebook is not already available. For example, Android and iOS apps will not be approved for this permission. In addition, Web, Desktop and TV apps will not be granted this permission.