sunil kumar
sunil kumar

Reputation: 35

"Feed action request limit reached" - Facebook SDK

I am getting this error from the Facebook SDK. Please help me to solve this problem, if possible.

"Uncaught OAuthException: (#341) Feed action request limit reached thrown in..."

Upvotes: 0

Views: 3420

Answers (1)

Lix
Lix

Reputation: 47976

You can not increase the limit enforced by Facebook. Even though in some cases many posts to users profiles might be a desirable outcome, sometimes it is considered spammy; Facebook prevents this by enforcing limits on things like this.

If you simply want to catch this error and display a more subtle error message your users, you can wrap your calls to Facebook with a try {} catch block.

You have not specified the language you are using so I'll give an example in PHP -

$post_obj = array(
  'link' => 'www.stackoverflow.com',
  'message' => 'Posting with the PHP SDK!'
));

try{
  $ret_obj = $facebook->api('/me/feed', 'POST',$post_obj);
  if (!$ret_obj) {
    throw new Exception('Post unsuccessful!');
  }
} catch (Exception $e) {
  // Display some error to the user.
}
// If we reached here we know that the post was successful. 

Upvotes: 1

Related Questions