Jump to content

Recommended Posts

Hello,

this module can publish content of a Processwire page on a Facebook page, triggered by saving the Processwire page.

To set it up, configure the module with a Facebook app ID, secret and a Page ID. Following is additional configuration on Facebook for developers:

Minimum Required Facebook App configuration:

  • on Settings -> Basics,
    • provide the App Domains,
    • provide the Site URL,
  • on Settings -> Advanced, set the API version (has been tested up to v3.3),
  • add Product: Facebook Login,
  • on Facebook Login -> Settings,
    • set Client OAuth Login: Yes,
    • set Web OAuth Login: Yes,
    • set Enforce HTTPS: Yes,
    • add "https://www.example.com/processwire/page/" to field Valid OAuth Redirect URIs.

This module is configurable as follows:

  • Templates: posts can take place only for pages with the defined templates.
  • On/Off switch: specify a checkbox field that will not allow the post if checked.
  • Specify a message and/or an image for the post.

post-4087-0-60791400-1457660876_thumb.jp

Usage

edit the desired PW page and save; it will post right after the initial Facebook log in and permission granting. After that, an access token is kept.

 
post-4087-0-78890000-1457661715_thumb.jp
 

Note: Facebook SDK for PHP is utilized.

post-4087-0-60791400-1457660876_thumb.jp

post-4087-0-78890000-1457661715_thumb.jp

  • Like 15
Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
  • 3 weeks later...
  • 5 months later...

Hey,

First off, thanks for this great module.

I was just wondering where the On/off checkbox is meant to show as every time I save the page at the moment it gets posted to Facebook and I'd rather have it that you check that checkbox and it stops posting to facebook?

Thanks!

 

Link to comment
Share on other sites

42 minutes ago, alexmercenary said:

where the On/off checkbox is meant to show

You need to create a new checkbox field, give it a name like autofbpost and add the field to your template. Next configure the module: in the inputfield On/Off Checkbox, enter the name of the field you created.

 

Link to comment
Share on other sites

  • 7 months later...

cant seem to get it working with facebook. keeps giving me this error:

AutoFbPost: post failed; click here to log in with Facebook.

URL blocked: This redirect failed because the redirect URI is not white-listed in the app's client OAuth settings. Make sure that the client and web OAuth logins are on and add all your app domains as valid OAuth redirect URIs.

my settings: https://www.dropbox.com/s/y4ajeac4wwlyup4/Screenshot 2017-07-07 16.53.23.png?dl=0

and platform the website url.

any help would be appreciated

Link to comment
Share on other sites

  • 3 weeks later...

@videokid yeah I do have opengraph in the header but it isn't detecting the image field, it's just using the site logo as the post image and the default site description as the description. It's weird.

Link to comment
Share on other sites

I do: https://www.featherbow.co.uk/gallery/cherington-open-plan-kitchen/

By the way thanks for the help on this.

I'm using MarkupSEO which is auto detecting the image field as it turns out so I don't actually need to add anything into the AutoFbPost field for image field name etc. Although I have anyway. The default 'images' field.

Thank you for your time

Link to comment
Share on other sites

Well I don't see anything wrong....
But it is your default description indeed [MarkupSEO isn't picking up body/description field?].

Personally I'm not using MarkupSEO, I have everything in my _init.php configured and, so far at least, it is working....
It's a pretty old website, still running pw 2.7.1/2..... Haven't tried it on pw 3.x yet, but I guess this has nothing to with pw...

I had a strange experience once where FB wasn't picking up any opengraph whatsoever, and I actually had to create a facebook app id for that site, but so far I've encountered it only once.... that was very weird too.... 

Sorry I can't be more informative....

  • Like 1
Link to comment
Share on other sites

Weirdly it's working now... Or at least the image is loading the correct one.

I have just cleared the default meta description from the MarkupSEO module settings and added directly to the homepage and then used the body as the smart description so it is used for open graph description and meta description for all other pages and that isn't showing the correct description yet when being posted but perhaps Facebook caches the results for a while?
 

Either way you have been a BIG help and I can't thank you enough for taking the time to take a look with me!

Thank you @videokid

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hello,

this module has been updated and it is now compatible with Graph API version 2.10.

Parameters 'description' and 'name' are not supported by the new Graph API version. Therefore, fields for description and name cannot be provided anymore.

  • Like 4
Link to comment
Share on other sites

  • 4 weeks later...

Hi,

I have problems to connect the module to FB app, I get the error mentioned by benbyf her above: AutoFbPost: post failed; click here to log in with Facebook. Then the error message says: "App not configured. This App is still in development mode and you can't access it"...

Is there anything else I need to set in facebook? I've tried all possible configuration and I don't know where to check now. Screenshot attached. Thanks a lot for any help.

 

fb.png

fb1.png

fb2.png

fb3.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...