Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Invalid data from FACEBOOK feed. Please, check credentials. #24

Closed
dbruening opened this issue Mar 23, 2018 · 10 comments
Closed

Comments

@dbruening
Copy link

Hello,

I get an error in the log during the Facebook Feeds import:
Error: Invalid data from FACEBOOK feed. Please, check credentials.

Does anyone get the same error?

Maybe I have a mistake somewhere?

Would be happy about help.

@anjeylink
Copy link
Contributor

Hi, seems like some error while importing from facebook. Most likely credentials are wrong, or trying to access protected page or page name you are trying to fetch is wrong

@jwittorf
Copy link

jwittorf commented Apr 11, 2018

Same here, using ext 1.6.2 and TYPO3 7.6.26. I've already checked Facebook ID (set the actual ID, no name) and the app credentials. Are there any specific settings I need to set in the Facebook app?

I used the extension in a different project in version 1.5.2 and there I'm not having the problem.

@dbruening did you manage to solve this issue?

// Update: I've used the Facebook app credentials from my other project and now it works. Could the issue be related to Facebook (changing their platform)? My "old" app uses v2.10 for all calls in the specific app settings.

@dbruening
Copy link
Author

Sadly I didn't solve the problem.

Today, I tried to get a JSON query directly and get the following message:

Access to this data is temporarily disabled for non-active apps or apps that have not recently accessed this data due to changes we are making to the Facebook Platform. https://developers.facebook.com/status/issues/205942813488872/"

Due to the Cambridge Analytica case and the new data protection regulations in the EU (GDPR, german: DSGVO), data protection is being worked on and new requests are temporarily not allowed.

This would also explain why it works with your "old" Facebook app access data.

So unfortunately we have to wait and see.

@tobiasquadflieg
Copy link

tobiasquadflieg commented Apr 25, 2018

There is now a way to get access to the Facebook feed. You need to create a oAuth token with Graph API Explorer that have manage_pages rights. Ive done a dirty version for my self. I removed the appsecret from the ext_typoscript_setup.

    settings {
        credentials {
            #facebook
            1 = appId
            #instagram OAuth 2.0
            2 = clientId,clientSecret
            #twitter
            3 = consumerKey,consumerSecret,accessToken,accessTokenSecret
            #youtube
            4 = apiKey
        }
    }
}

then i removed the appsecret from the ImportTaskUtility.php

 const FACEBOOK_API_URL = 'https://graph.facebook.com/v2.12/';
 case Token::FACEBOOK:
                        //getting data array from facebook graph api json result
                        // @codingStandardsIgnoreStart
                        $url = sprintf(
                            self::FACEBOOK_API_URL . '%s/posts/?fields=likes.summary(true).limit(0),message,attachments,created_time,updated_time&limit=%d&access_token=%s',
                            $configuration->getSocialId(),
                            $configuration->getFeedsLimit(),
                            $configuration->getToken()->getCredential('appId')
                        );
                        // @codingStandardsIgnoreEnd
                        $data = json_decode(GeneralUtility::getUrl($url), true);
          
                        if (is_array($data)) {
                            $this->updateFacebookFeed($data['data'], $configuration);
                        } else {
                            LoggerUtility::logImportFeed(
                                'Invalid data from FACEBOOK feed. Please, check credentials.',
                                $configuration,
                                LoggerUtility::ERROR
                            );
                        }

This works but is not the best way to do 😄

@JohannesRegner
Copy link

I think the changed the mechanism with version 3.X
Here are more infos:
https://developers.facebook.com/docs/graph-api/reference/v3.1/page/feed

The extension work with my old facebook api 2.7 but not with the 3.1 api...

@meckitt
Copy link

meckitt commented Oct 31, 2018

Because of this bug the extension is not usable. Is there a fix soon? I would love to use that extension.

Thank you very much.

@JohannesRegner
Copy link

It would be nice if you we can choose the api version in Backend... For newer api versions >3.1 you need the rule "manage_pages" from facebook, to use this feature with your api token! This is a long process via facebook, took me about 2 months to get this access with newer api!

@zvenson69
Copy link

so it's not working any more without getting the "manage_pages" rule from facebook added to your api?

@JohannesRegner
Copy link

JohannesRegner commented Nov 5, 2018

I think so, especially with never api versions from Facebook! Otherwise your app token is only valid for 1-2 days und you have generate a new one via graph explorer... if you have the right, your app token is always valid... This was my finding... (https://developers.facebook.com/docs/pages/access-tokens)

@anjeylink
Copy link
Contributor

Read about new Facebook API
https://docs.typo3.org/p/pixelant/pxa-social-feed/master/en-us/Configuration/Index.html#facebook-token

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

No branches or pull requests

7 participants