Topic-icon [SOLVED] Error: Facebook API Error: An unknown error has occurred.

Active Subscriptions:

None
7 years 8 months ago - 7 years 8 months ago #59060 by Charmaine
Hello,
The social channels were working fine until today. First I noticed that the new facebook post didn't appear in the Social Stream module.
I have checked the Channels on the backend and there was an error:
Error

Facebook API Error: An unknown error has occurred.

I logged in from front end with the Facebook credentials but it didn't solve the issue. I have also checked the Facebook App, reentered the Application ID and App Secret. After that, I made the Autotune.

Sharing on Facebook is not smooth either - I was using {SCOpenGraph image=http://...} tag, in the morning the image was being picked up correctly, now it doesn't pick up any picture at all. I used both Facebook Debug and sharing from the page this morning.

When I change Channel type settings from Page to Profile - I can see my FB posts (from my personal page) in the Social Stream module, and no Error appears. My API version is v2.5 (on Facebook).
Would you please help me?

Thank you.
Last edit: 7 years 8 months ago by Charmaine.
The topic has been locked.
Support Specialist
Can you let us know a URL for a page that's not sharing properly and having the issues with the Facebook Debug tool? That will help narrow things down.

I'm unsure why you'd see that error message in the Channels area. Logging back in on the front-end is normally what we'd recommend. However, we'll try to help however we can once we get more details about pages that are having difficulty being shared.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
7 years 8 months ago - 7 years 8 months ago #59066 by Charmaine
Hi Alex,

Thanks for your response.

Sharing didn't work last night on all pages (blog, VM pages even though I explicitly indicated the og:image for every product), but now it seems working fine.

But the error with the API is still there. And no posts from the FB page (not personal profile) in the Social stream module.
I see in the App page of Facebook developers site, that there 56 errors. No clue where to look for info what kind of errors are those and how I can fix it. Do you think deleting this App and creating a new one will solve the issue?
I would really appreciate your help.

Thanks!
Last edit: 7 years 8 months ago by Charmaine.
The topic has been locked.
Support Specialist
Deleting the app and recreating it likely won't help things at all.

Would it be possible to Private Message us admin credentials to your site so we can investigate further? You can PM me by clicking the mail icon under my picture to the left.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
Hi Alex,
I sent the credentials yesterday.

Today I was trying to refresh the page (front end) and got this error: Unknown SSL protocol error in connection to api.twitter.com:443. After refreshing again it disappeared, but I just wanted to let you know - maybe it will give you some ideas. My SSL is valid and works fine though.
The topic has been locked.
Active Subscriptions:

None
Hi Alex,

I wanted to check if you received the message with the admin log in and password?
Btw, I noticed that in your social stream module there are only tweets, too! or maybe you just don't post to Facebook that often... :-)
The topic has been locked.
Support Specialist
We tried both credentials (for administration area and FTP) and neither allowed us to log in. Could you double-check that they are correct?

For our social stream module on sourcecoast.com, we actually have Facebook, Twitter and LinkedIn posts configured. However, our access tokens had apparently expired over the weekend so FB and LI weren't showing up correctly. Thanks for pointing it out!

-Melissa
The topic has been locked.
Active Subscriptions:

None
Thanks for your reply, Melissa!

Last night I had to change the login and switch off FTP access - will send you the new credentials right now!

Thank you.
The topic has been locked.
Support Specialist
Thank you for the new credentials. We were able to log in / FTP in to debug the issue.

It appears that the problem is related to access tokens. There are two ways to retrieve the Facebook Page's feed: 1. Using the Page's access token which will return all posts on the page or 2. Using the User's access token, limiting the posts returned to those that the user can see. Depending on how you have your page/admin set up, using the user access token may or may not be a problem with seeing all posts.

Using all versions of the API, we are seeing this problem with the "An unknown error has occurred" when the Page Access Token is used to retrieve the posts. You're using 2.5, but this behavior exhibits from them all as we found with testing the Graph API Explorer . This seems to be a confirmed recent bug with Facebook see here

To workaround this, we changed one line of code on your system in /components/com_jfbconnect/libraries/provider/facebook/channel/page.php. At line 92, we uncommented a line of code that forces the channel to use the user's access token. I could then see the test stream data in the backend now displays the posts.

I would suggest subscribing to the bug that I posted above and posting a comment that your site is affected, but the workaround should hopefully fix your issue.

Let us know if you have any questions.

-Melissa
The topic has been locked.
Active Subscriptions:

None
Thanks a million, Melissa!
I see my module is working perfectly now!
I'm not very familiar with Facebook documentation, need to deep dive - thank you for the links. I will try to submit the bug at their page, too.

Thank you again.
The topic has been locked.