Search code examples
phpfacebook-graph-apifacebook-php-sdkfacebook-sharerfacebook-share

how to solve error 'Sorry, this feature isn't available right now: An error occurred while processing this request. Please try again later.'?


I tried to share folder image using php share url using below code:

$url='https://www.facebook.com/sharer/sharer.php?app_id=xxxxxxxxxxxxx&u=https://localhost/PhpProject1/temp/image1.png&display=popup&ref=plugin';
echo '<a href="'.$shareUrl.'"><button  style="width:70%;background-color:#4267B2;color:white;border:none;height:35px;">Share on Facebook</button></a>';

But it is giving the error as 'Sorry, this feature isn't available right now: An error occurred while processing this request. Please try again later.'. I tried to solve this error but, not succeeded. So, please help me in solving this problem.

Thanks in advance.


Solution

  • You can use this link to share link(must be live) i have already check that this is working very well in one of my project

    https://facebook.com/sharer/sharer.php?u=https://www.google.com
    

    This link working only when you will add live link in u parameter. So when your project will be live then this sharer link is working.I hope you can understand my point.

    That means your code has only one problem that you have not added live website link. Right now you are adding localhost server link so facebook platform can not detect this local server link.

    You can check my output on below screenshot.

    enter image description here