Facebook Page Webhook stopped working. It was working from last 1 year - facebook-graph-api

We have configured webhook in facebook app earliear.
After subscribing the facebook page we were able to receive real time update on our server from facebook page.
Now webhook was stopped working.
We are not getting any real time update for new post from facebook page.
We have pre-configured setup as per bellow guide:
https://developers.facebook.com/docs/pages/realtime/
I'm able to view that my page has installed my app by using bellow sample api:
GET graph.facebook.com/PageID/subscribed_apps
But not getting real time update
Any help will be appreciated.

In general, if a webhook stops working: For Remove the webhook, and then add it again. (This helps in most such cases. Facebook will stop sending updates if your endpoint is too slow to respond or responds with errors over a certain period of time.)
One thing to add,My facebook app is not live but it has been working from last year.
If you want updates from a “live” page (as opposed to one created by a test user), you need to set your app live now as well.
Previously apps in dev mode were mostly unrestricted, but with the current changes in light of Cambridge Analytica, they changed that.

Related

Google OAuth consent screen stays on "Needs verification" after submission

My application needs to interact with the Google API's using some specific scopes, so I need to submit it for verification. When doing so, I use the Prepare for verification button in the screenshot below.
After completing the form, the toast message “Your app has been submitted for verification” appears and I am redirected to the same screen. However, the status "Needs verification" remains and no change is visible to indicate that my app is in the process of being verified. I am able to repeat the process without any visible change.
I submitted the application for the first time 2 weeks ago, but still no change. Is this a bug in Google's platform? How should we proceed (without having to buy a 100$/month support subscription)?
Thanks a lot
You can check your app verification status via email;
Your project's last submitted OAuth consent screen is under review. Additional information about your app, if required, may be requested via email at the email addresses you provided in the Developer contact information section of the Prepare for verification process. Expect the first email within 3-5 days.
You can find more information about this process in the Oauth Verification documentation.
If so happens that your app is a "restricted scope app" verification may take a few weeks instead of a 3-5 days.
You should have get an email with the confirmation that your app is being verified. If not try again and check your spam folder. If you aren't getting any emails then go to IssueTracker and report a bug.

facebook channel -- bot framework issue

So I made a bot using Bot Framework v4 Nodejs SDK and while the bot was healthy and running just yesterday. Today, something peculiar happened in the bot, only through facebook channel.
So whenever someone sends a message in the bot through messenger: the from object contains {"id":"3012023272144004","name":"FACEBOOK_USER_NAME"}
this is displayed in my code:
console.log("FROM DATA : " + JSON.stringify(stepContext.context.activity.from));
today it only displays {"id":"3012023272144004","name":" "} where the facebook name of user is always empty (and I assure you that users,that I tested, has a facebook name)
also whenever I request for facebook firstname and lastname using graph API I have this response
{"error":{"message":"(#80006) There have been too many messenger api calls to this Page account. Wait a bit and try again. For more info, please refer to https:\/\/developers.facebook.com\/docs\/graph-api\/overview\/rate-limiting.","type":"OAuthException","code":80006,"fbtrace_id":"AZp9laYMB2IGha-WAPYDBXH"}}
I retried it for the whole day, and nothing happened. I checked the dashboard for rate limit but all I can see is 0% limit used (the app is exclusively connected to my page and the page is exclusively connected to my app. thanks for the clarification)
and this never happened before, I always get the firstname, lastname, id and even profile picture - sample body response from previous calls:
{"first_name":"Nightshade","last_name":"Villabrille","profile_pic":"https:\/\/platform-lookaside.fbsbx.com\/platform\/profilepic\/?psid=2951340481545239&width=1024&ext=1586604925&hash=AeTsZ60vo4npjquO","id":"2951340481545239"}
I really have no idea where to ask this issue. Is this framework issue? facebook graph issue? or bot channels issue? Thanks!
---I'll provide code or respond to anything that I need to clarify. Thanks!
PS: Even other channels responds like this on email: {"id":"apvillabrille#up.edu.ph","name":"Villabrille, Aleimar P."} and webchat: {"id":"3012023272144004","name":"Web Chat User","role":"user"}
The Azure Bot Service change log is not currently available to the public, and the problem you experienced may not have had an entry in the change log anyway. It's unclear if the problem was on your end or Facebook's end or Microsoft's end, and if it was on Microsoft's end then it was more likely to have been a random outage than an actual code update. If your production bot experiences problems like this in the future then you can submit a support request through your bot resource in the Azure portal.
You might also consider engaging with the Facebook developer community: https://developers.facebook.com/docs/messenger-platform/useful-resources

How to insert timeline card in new user account for first time

I've followed the Glass quick start guide for Glass for Python.
I'm able to run the server locally and can insert timeline cards to my account using the Admin Panel in Quick Starter. So far so good. But how the flow would look like for a new user? I'm creating a glassware similar to weather updates. In Quick starter, I had to trigger the "post" thru a "form" element. How does it work when someone installs Glassware from store. What triggers that person to get "very first" timeline card. I'm quite confused here. Any useful information will be helpful.
When a user turns on your Glassware in MyGlass, they will be redirected to your auth URL and taken through an OAuth flow (just as would happen if you visit that URL manually without going through MyGlass when you're developing). After they go through that authorization, you can perform any post-auth tasks that you need, such as inserting contacts or timeline items.
The relevant code in the Python Quick Start can be found in the _perform_post_auth_tasks method of the OAuth request handler, which is called at the end of the get request before redirecting to the Glassware's main page.

What could cause a Django based Facebook Page Tab to take 2 minutes to load?

I have a very simple web page that uses the Facebook Javascript API and is installed as a tab on a Facebook page. When the page is loaded, the only thing it does after calling the usual Facebook init code is to listen to auth.authResponseChange and then show/hide various elements depending on whether the user is logged in or not.
If I load this page, via http or https in an ordinary browser session, everything is fine. The page loads reasonably fast.
But if I load the page tab in Facebook, it hangs for about two minutes. Chrome tells me that this wait is due to 'waiting' for my page. But if I watch the access log, I don't see an access request logged until just before the page displays. So it seems like Facebook is masking what is really going on behind the scenes.
I opened a ticket with Facebook, and they replied that this issue was due to my code and reproducible with any POST that contained a signed_response.
After much head scratching and experimentation, I found that adding the following two lines to the view that handles this page fixed it:
if 'signed_request' in request.POST:
pass
So clearly Django 1.3.1 is holding the HTTP session open until you actually read some POST values. Ouch.

Desktop App Workflow Error When Logging In

Our desktop application integrates with Facebook using the desktop app workflow and for approx. 18 months has been working without any problems. However, we are starting to get reports from some users that they cannot get past the login process.
When the login is successful Facebook should be attaching the access_token to the redirect_uri. Our application detects this and moves the user to the main part of our Facebook integration. What appears to be happening in some situations is that the access_token parameter is missing which causes our application to leave our embedded browser window open with the following message from Facebook:
"Success
SECURITY WARNING: Please treat the URL above as you would your password and do not share it with anyone."
What is strange is that this does not occur with all Facebook accounts and which Facebook accounts it occurs with seems to be changing. For example, we had a report of this approx. 1 week ago but could not duplicate it with my own Facebook account or with a colleague's Facebook account. Today, I still cannot duplicate it with my own Facebook account but my colleague now gets the problem.
The URL our code sends to Facebook is:
https://graph.facebook.com/oauth/authorize?client_id=xxxx&redirect_uri=http://www.facebook.com/connect/login_success.html&type=user_agent&display=popup&scope=read_friendlists,user_photos,friends_photos,user_photo_video_tags,friends_photo_video_tags,user_events,friends_events,user_groups,friends_groups
Reading the latest API documentation it looks like they recommend a different way to connect which we have also tried:
https://www.facebook.com/dialog/oauth?client_id=xxxx&redirect_uri=http://www.facebook.com/connect/login_success.html&scope=read_friendlists,user_photos,friends_photos,user_photo_video_tags,friends_photo_video_tags,user_events,friends_events,user_groups,friends_groups&response_type=token
To rule out our application as the cause we have tried these URLs directly within a web browser. What we find is that when using my Facebook account the browser re-directs to the success URL that includes the access_token parameter but when using my colleague's account the browser re-directs to the success URL that includes the access_token and then immediately re-directs again to the success URL without the access_token.
so... As far as we can tell this is either:
a) A change to the API which we cannot find documented anywhere
b) A bug in Facebook
c) Something that is now controlled by the user's Facebook security settings
Is there anybody who could explain why Facebook is acting differently with different accounts and how we can go about fixing this?
Thanks.
Kevin.
I have the same problem in my desktop applications.
And I just solve it with careful reading in ht*ps://developers.facebook.com/docs/howtos/login/login-for-desktop/. The solution is to change redirect_uri from ht*p://www.facebook.com/... into ht*ps://www.facebook.com/...
Hope this will help you just like it help me
NB:
change ht*p into http
sorry i have to change the http into ht*p so that i can post the answer.