Hi,

This module works niceLy, but have an issue with facebook, when i clear cache, i received this,

[request] => POST /?id=####&scrape=true HTTP/1.0
User-Agent: Drupal (+http://drupal.org/)
Host: graph.facebook.com
Content-Length: 0

[data] => {"error":{"message":"(#4) Application request limit reached","type":"OAuthException","is_transient":true,"code":4,"fbtrace_id":"######"}}
[protocol] => HTTP/1.1
[status_message] => Forbidden
[headers] => Array
(
[access-control-allow-credentials] => true
[x-fb-rev] => #####
[x-fb-trace-id] => ######
[content-type] => text/javascript; charset=UTF-8
[facebook-api-version] => v2.0
[cache-control] => no-store
[pragma] => no-cache
[access-control-allow-origin] => *
[expires] => Sat, 01 Jan 2000 00:00:00 GMT
[www-authenticate] => OAuth "Facebook Platform" "invalid_request" "(#4) Application request limit reached"
[vary] => Accept-Encoding
[x-fb-debug] => #####
[date] => Mon, 04 Jul 2016 01:47:51 GMT
[connection] => close
[content-length] => 143
)

[code] => 403
[error] => Forbidden

I dont remember myself calling facebook for multiple times.

Thank you and have a nice day.

Happy coding,

Sincerely,
Linantud, Karl Michael G.

Comments

karltud123’s picture

.

karltud123’s picture

Issue summary: View changes

+1

garethhallnz’s picture

Hi

Do you have enough content the exceed the rate limit?

The error message seems pretty clear ... you have exceeded the allowed api request limit. See: https://developers.facebook.com/docs/graph-api/advanced/rate-limiting

Every time FB cache is cleared it's written to the log. Please verified and see if you have multiple entries.

The module has only 3 options:
1. Local menu task
2. VBO
3. Rule action

I would guess the issue is in either:
a) Somewhere in VBO. Maybe there's some stuck batch job? Look in the database (batch table) if you can try truncating the table and try again.
b) Perhaps you a the rule action implemented somewhere?

Cheers

karltud123’s picture

Hi,

That was quick!

I am only trying first to clear the cache using the local menu task,
I also checked the code and just run the,

$fb_url = 'https://graph.facebook.com/?id=' . $page_url . '&scrape=true';
$response = drupal_http_request($fb_url, array('method' => 'POST'));

in Devel, and its throwing same error.

I wonder how I reached the rate Limit where I am not doing this before.

Thank you and have a nice day.

Sincerely,
Linantud, Karl Michael G.

garethhallnz’s picture

Hey

I just tried it on one of my own projects and it's working perfectly.

[request] => POST /?id=http://dev.local/documentary/my-page&scrape=true HTTP/1.0
User-Agent: Drupal (+http://drupal.org/)
Host: graph.facebook.com
Content-Length: 0


    [data] => {"id":"1021721084591283","url":"http:\/\/dev.local\/documentary\/my-page"}
    [protocol] => HTTP/1.1
    [status_message] => OK
    [headers] => Array
        (
            [access-control-allow-origin] => *
            [pragma] => no-cache
            [cache-control] => private, no-cache, no-store, must-revalidate
            [facebook-api-version] => v2.0
            [expires] => Sat, 01 Jan 2000 00:00:00 GMT
            [content-type] => text/javascript; charset=UTF-8
            [x-fb-trace-id] => GDyRH43c0Qq
            [x-fb-rev] => 2425895
            [access-control-allow-credentials] => true
            [vary] => Accept-Encoding
            [x-fb-debug] => S7vUzR9xsR7+P9SUo8O3ldLQT1NYBGV8hPDc+BD+rqEw1lS2aBUYKUgOipT7srcayExcnD2qDckDMbQubtU/JA==
            [date] => Mon, 04 Jul 2016 07:38:17 GMT
            [connection] => close
            [content-length] => 104
        )

    [code] => 200

Lets first figure out if it was Drupal who made the requests.
Can you check how many entries you have in your watchdog table?

If you have access to the DB run
SELECT count(wid) FROM watchdog WHERE `type` = 'Facebook cache';

karltud123’s picture

Hi,

Thank you!

My problem was soLve when I added access token to the Graph Call.

Thank you and have a nice day.

garethhallnz’s picture

Status: Active » Closed (works as designed)