Problem/Motivation

I'm trying to get Feeds from FB, but got errors.

After debugging I have found that issue is in part where permanent token should be fetched

 // Permanent Token.
      $request = $client->request('GET', $url . "/$account_id/accounts?access_token=$long_token");
      $request = json_decode($request->getBody()->getContents());
      foreach ($request->data as $response_data) {
        if ($response_data->id == $page_id) {
          $config->set('page_permanent_token', $response_data->access_token)->save();
          return $response_data->access_token;
        }
      }

Response data is empty for this request.

Proposed resolution

I have found that permanent token can be fetched with request to https://graph.facebook.com/{graph_version}/{page_id}?fields=access_token&access_token={long_lived_token}

Issue fork socialfeed-3486030

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sorlov created an issue. See original summary.

sorlov’s picture

Status: Active » Needs review
hemangi.gokhale’s picture

Status: Needs review » Closed (outdated)

@sorlov, I believe this issue has already been resolved in 3.0.0-alpha1 and 4.0.0-alpha1. Please give these versions a try and let us know if you still encounter any issues. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.