Needs some work.

Clicking on the "Please you need to connect to the Facebook account which will display selected contents." link does nothing but remove the overlay and refresh my page.

After entering the Appid, secret and facebook page id and saving the info, I copy the https://graph.facebook.com/oauth/authorize?client_id=[FB_APP_ID]&redirec... url into my browser and it errors out.

Problem 1 is that the url your module needs to redirect back to is not located at my site root, but a subfolder. Your recommended link points to the site root. If I input the suggested url nothing happens visually, but there are 404 errors in the log and my node creation pages still show facebook as not being configured, In general, it is not configured to use the paths correctly.

Problem 2 is if I append the correct path,I get the same result, but the log shows your module appending a double subdirectory to the path and generating another 404.

A step by step guide on configuring the facebook portion would be nice, the twitter setup was a breeze.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

brice_gato’s picture

redirect_uri is generated automatical from Facebook API according to your host :

$login_url = $facebook->getLoginUrl();

Unfortunately Facebook API does not care about your extra config (subfolder).

brice_gato’s picture

Status: Needs work » Active
RAWDESK’s picture

Hi @brice_gato,

I've been able to get the URi redirect configured correctly but i didn't use the direct links presented in the publish away configuration pane. I used developers.facebook.com/apps advanced configuration instead.
You can see details in attachment. Please notice the yellow marked portion inside the url that should contain your unique FB APP id !

In the other 2 attachments you can see a remaining issue i have completing the publish end to end.
I have no idea where to get the "facebook page ID" (third parameter in the settings pane) !
Maybe you can help me out with this ?

RAWDESK’s picture

UPDATE:
Fixed the FB ID issue using http://findmyfbid.com/
Reengaged the oauth url with FB APP ID and redirect string but now receiving another error :
Invalid Scope: publish_stream, offline_access...
See attached screenshot for details.
Before i got this message facebook asked me to login first.
Also had to tweak my advanced app settings as shown in second attachment in order to get this far..

RAWDESK’s picture

FINAL UPDATE and solution :
According this post, 2 applied permission scopes have been set deprecated by Facebook :
http://stackoverflow.com/questions/30074899/error-invalid-scopes-offline...

Therefore i applied a small patch inside these modules
publish_away.module
publish_away.admin.inc

This also brings up an altered authentication URL in the facebook config pane:
https://graph.facebook.com/oauth/authorize?client_id=[FB_APP_ID]&redirec...
Notice there are only 2 scopes left instead of 4.

DarkteK’s picture

You said you made a patch, but I dont see it commit in the module, can you help me please? When I save all my configuration it does nothing

RAWDESK’s picture

Hi DarkteK,
Attached 2 diff's between released and patched files.
So only these 2 query parameters are still allowed by facebook :
manage_pages,publish_actions
Hope it helps

vpelss’s picture

The 2 file modifications and new activation link worked for me.

Thanks!

It was not very clear to me which ID to use in the activation URL.

deanflory’s picture

It would be great if the maintainer could get this into a release, otherwise the module is useless.

  • brice_gato committed 18bc93f on 7.x-3.x
    Fix issue #2382141 by rawdesk, Facebook configuration doesn't work - The...
brice_gato’s picture

Thanks rawdesk, the patch has been applied.

brice_gato’s picture

Status: Active » Needs review

  • brice_gato committed c7d12a1 on 7.x-3.x
    Fix issue #2382141 by rawdesk, Facebook configuration doesn't work - The...
Olliexove’s picture

According to Facebook docs you need to add publish_pages permission also to be able to publish as a page. I verified this with my test app, token with only manage pages and publish_actions wasn't able to publish to a page.

Frando’s picture

Status: Needs review » Needs work

I ran into similar problems. After installing and configuring publish_away for Facebook, I could syndiate posts to Facebook, however they are being published as a post by the App's user account onto the page, instead of being published by the page itself. We need to publish as the page itself, though.

I also tried requesting the publish_pages permission as #15 suggested, this didn't change the behavior though: Posts are still published by the user onto the page instead of being published by the page itself.

Frando’s picture

Status: Needs work » Needs review
FileSize
2.34 KB

With the attached patch, posting as a Facebook page works for me finally.
It does two things that were needed for me for this to work:

  1. Request the publish_pages permission.
  2. Use the token saved when first connecting instead of usng $fb_token = $facebook->getAccessToken();. I'm not really sure why, but the token in the variable publish_away_fb_token was a proper user token, whereas $facebook->getAccessToken() returned an app token, with which i couldn't access the account information or post as a page.
  3. Use the user access token for the request to /me/accounts. Without, I got an oauth error (Access token needed).

I am not too familiar with the Facebook API, this was more trial and error, but with the attached patch I can post as a facebook page, without I can't.

  • 87e74d7 committed on 7.x-3.x
    Fix issue #2382141 by frando and olliexove - Add publish_pages...
brice_gato’s picture

Thanks Frando, your patch has been applied.