Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Application request limit reached | FB App #39

Closed
dwhitz opened this issue Jun 9, 2018 · 21 comments
Closed

Application request limit reached | FB App #39

dwhitz opened this issue Jun 9, 2018 · 21 comments
Assignees
Labels
Milestone

Comments

@dwhitz
Copy link

dwhitz commented Jun 9, 2018

Full error:

FanPage {
  ["error"]=>
  object(stdClass)#6219 (5) {
    ["message"]=>
    string(38) "(#4) Application request limit reached"
    ["type"]=>
    string(14) "OAuthException"
    ["is_transient"]=>
    bool(true)
    ["code"]=>
    int(4)
    ["fbtrace_id"]=>
    string(11) "CarFGcD42Ls"
  }
}

Searching the error i found this question on stackoverflow, and seems that The Facebook API limit isn't really documented, but apparently it's something like: 600 calls per 600 seconds, per token & per IP.

So I've tried to disable the plugin for some days but this do not solve the issue, i think that could be helpful if you (@mahype ) check your app from the facebook developer dashboard.

KR

@alantygel
Copy link

Having the same problem since 1st june

@hrvylein
Copy link

maybe @mahype could tell us how we can register our own app on facebook? so we all could have our own unique keys.

@mahype
Copy link
Contributor

mahype commented Jun 16, 2018

I think I have to add an option for that. I will take a look!

@mahype mahype self-assigned this Jun 16, 2018
@mahype mahype added the bug label Jun 16, 2018
@mahype mahype added this to the 1.0.0-beta.8 milestone Jun 16, 2018
@hrvylein
Copy link

Can you tell us how you created the secret token for the plugin? As a workaround we could change it directly in the source.

@dwhitz
Copy link
Author

dwhitz commented Jun 16, 2018

@hrvylein I agree, in this way everyone can have the own token and errors like this wouldn't happen again.

@mahype
Copy link
Contributor

mahype commented Jun 17, 2018

I've got to take a look too, but I will let you know as soon as possible!

@mahype
Copy link
Contributor

mahype commented Jun 17, 2018

OK. You have to change the access token. You can do it in this line:

https://github.com/awsmug/Fanpage-import/blob/master/components/import/facebook.php#L59

Therefore you have to create an Access token, which you can get here:

https://developers.facebook.com/docs/apps

Just create an app and go on. I am sorry, that I can not be more precise, but the creation for an app is not possible for me, because the captcha is not working in the moment.

@mahype
Copy link
Contributor

mahype commented Jun 17, 2018

I have to renew the Auth process for the plugin. I will do that within the ticket #43.

@alantygel
Copy link

Thanks, @mahype
Just in case someone needs, the following command generates the access token (after you created an App):

curl -X GET 'https://graph.facebook.com/oauth/access_token?client_id={app_id}&client_secret={app_secret}&grant_type=client_credentials'

@hrvylein
Copy link

@alantygel access token generation works, but I'm still unable to retrieve data from my facebook page.

I think we have to add the "manage_page" permission but facebook needs to verify every app. They ask for a screen cast that shows the login process and how my app is using these information. I guess I'll wait till @mahype has added oAuth authentification.

@mahype any ETA on this?

@mahype
Copy link
Contributor

mahype commented Jun 20, 2018

HI @hrvylein,

I have tried to change the way for the login in the way facebook recommends it, but I have a problem to login. The redirect_uri won't be accepted despite the fact, I habe added it to the app.

I have to see that this works, then I can give you a new version.

Sven

@hrvylein
Copy link

@mahype take your time. If we can help, push your work to a dev-branch so we can have a look.

@hrvylein
Copy link

hrvylein commented Jul 1, 2018

Any News?

@Redrocirt
Copy link
Contributor

@mahype Not sure if this is usefull for you, but maybe you can have a look at this plugin for Contao CMS how they solved the connection to facebook api and adapt it to your Wordpress plugin: https://github.com/m-vo/contao-facebook-import (didn't test it, just found it when searching for "facebook import")

Besides that I found this note at https://developers.facebook.com/docs/pages/

Beginning May 1, 2018, the App Review Process will resume. All apps, including those formerly approved, must undergo App Review in order to retain or gain access to the Pages API.

For apps currently using the API, you will have until August 1, 2018 to submit your app for review, even if your app has gone through the app review process previously, or your app will lose access to the API.

As part of the App Review process, you must undergo Business Verification to access the Pages API.

I liked your plugin because I (as a user) didn't have to register my own app to use this plugin. Do you see any chance it will still keep working like this?

Please keep up the work and try to find a solution to get the plugin back to work – it is "out of order" for weeks now and I already got asked to remove it because it's not working... Thank you very much for your efford and support!

@dwhitz
Copy link
Author

dwhitz commented Jul 16, 2018

The 2018-07-12 at 03:14:40 the plugin comes back to work and the next day it fails again with the authentication. Guys could you check your log?

@mahype
Copy link
Contributor

mahype commented Jul 17, 2018

I liked your plugin because I (as a user) didn't have to register my own app to use this plugin.

Thats the point. I don't think that this is possible anymore. I have tried it to change the way for logging in, but it didn't work. An now I am seeking time to come back for work on the problem.

@ramen100
Copy link
Contributor

@mahype I think you must adjust the plugin to work with the new permissions system and users of your plugin need to register a facebook app with these permissions.

I personally don't mind if I have to register as a facebook developer - in fact, other Facebook Plugins for WordPress, e.g. Import of Events, require an app, too.
If you don't want to use your cell phone number, there are several websites that can help you with that.

@hrvylein
Copy link

Maybe we can use the webhooks from Facebook. Thats how ifttt made their fb2wp work.

@mahype
Copy link
Contributor

mahype commented Aug 6, 2018

Hi,

I have checked that now again. To use the plugin in future, there should be added an App ID and an App Secret field and everybody have to add an app to facebook. Also the App have to be reviewed that you can gain the page data. The review also contains a screencast as far as I know.

There would be only the way with the Webhooks, but for that you also have to add an app and to setup the webhooks in the app and I have to change the FB data model in the plugin. Thats too much at the moment. I have no time for that in the moment. Also the complete plugin should be refactured.

If you want to change that, feel free to fork this repository or send me a pull request. I will not change it in the next time, because I have no free time for it. Sorry for that!

If this won't change the next three month, I think I will remove the plugin from the WP Directory.

Greetings,

Sven

Sven

@mahype mahype closed this as completed in bccae81 Sep 30, 2018
@hrvylein
Copy link

hrvylein commented Oct 1, 2018

Sorry to reopen but maybe @KathlynnS could clarify how she made an app and got it approved? My app can't access "manage_pages" permission and seems to be considered as an "server to server" app, but unfortunately facebook help is somehow cryptic.

@ramen100
Copy link
Contributor

ramen100 commented Jan 10, 2019

I underwent the whole review process and it's not even necessary. 😢

It seems that the process is quite simple and obvious. But in case someone is as slow-witted as me, I write it down step by step. You need to be admin of your facebook page for this!

  1. register as developer on https://developers.facebook.com (you might have to add a phone number to your fb account)
  2. Add an App with name and contact email, skip scenarios
  3. Though i am not even sure if this is necessary as well, configue your app like this:
  • Settings/General: Add your E-Mail, App Domain like your WP domain, add platform "website" at the page bottom, URL = your WP Url,
    save your changes!
  • Settings/advanced: Be sure that Require App Secret is OFF
  1. be sure that your app is in development mode, NOT LIVE. Since only you/your website will use it, it needs no live mode and no app review.
  2. Top of the developers page, open Tools-> Graph API Explorer.
  3. On the Explorer, select your app and your page on the right. Page only shows up if you are admin
  4. if not in the list, add permissions manage_pages, publish_pages. Because of your app being in development mode, you can assign them yourself.
  5. click Get Access Token.
  6. Page refreshes and your selections on the right might be reset. click on the information icon next to the AccessToken, it should state your page and the permissions manage_pages, publish_pages.
  7. Click on the button Open in Access Token Tool
  8. Click Extend Access Token, the new token appears in green below. Click on the debug button next to it.
  9. Access Token Tool refreshes, stating: Expires: Never
  10. Download the newest Version of the Plugin with the changes made by @KathlynnS and paste the lifelong Access Token in the plugin options.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants