Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Right now the module allow to publish content in the user profile but would be great to allow the module to publish directly in a Facebook page if the user has the correct permissions.
Comment | File | Size | Author |
---|---|---|---|
#14 | 2907167_publish_to_facebook_page_with_media.patch | 9.67 KB | joshua.boltz |
#8 | 2907167_publish_to_facebook_page.patch | 6.5 KB | joshua.boltz |
Comments
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous at Netuxo Ltd (RIP) for La Transicionera commentedI support this. For organizational websites it is crucial to be able to configure posting on a page. Best would be to allow this per content type, as an organisation might have more than one page, and so it would be nice to be flexible here.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous at Netuxo Ltd (RIP) for La Transicionera commentedMore info for posting to pages:
Comment #4
WebWalker3D CreditAttribution: WebWalker3D commentedI am also looking for a similar feature, as I want to have content posted to the business page.
The module as it stands now would be great for someone writing a personal blog, but aside from that, I'm not sure the autopost feature is something "individuals" would be inclined to use. Especially having an application post on their behalf, and privacy concerns, etc. BUT for pages, it makes tons of sense.
Can we please look at addressing posting to pages vs personal newsfeeds?
Thank you!
Comment #5
sahaj CreditAttribution: sahaj commentedThis is really a fail for the Drupal Social Initiative to harmonize Social Networking functionality in Drupal.
Without the ability to post on FB Pages, we have to opt for another module (https://www.drupal.org/project/autopost_social), which itself do not offer connections beside FB and Twitter.
Please let's try to harmonize a bit more ))
Comment #6
gnugetNow that facebook deprecated (and removed) the
publish_actions
permission this is now critical.Without this the module cannot be used without custom code.
I will pump the priority and hope be able to spend time on it this week.
Comment #7
gnugetComment #8
joshua.boltz CreditAttribution: joshua.boltz at Mediacurrent commentedInitial patch added that adds support for posting to a Facebook page. Seems to be working pretty well, but does rely on custom code, such as in a hook_entity_insert() or hook_entity_update().
Most notably, it updates the code to provide both the Facebook SDK and the League Oauth library and other re-factoring.
In order to post to a Facebook page, there need to be a few things:
1) A Facebook App (these are the credentials you put into the Social Post Facebook module configuration)
2) A Facebook Page
3) A Facebook user who has the `manage_pages` and `publish_pages` permission, which will typically be the user who created or has permission to manage the Facebook page.
4) Custom code in a custom module, such as in a hook_entity_insert() or hook_entity_update() that is triggered on content changes. See below.
Comment #9
gvso@gnuget Are you planning to solve this issue on 1.x?
I guess it's time for us to also provide a 2.x branch that really works. I'll try to work on that in the coming weeks.
It's hard to maintain all modules, specially when I do not use them anymore. I have taken Social Auth as a priority for now since you can basically build anything from there. That being said, any contributions are welcome to improve Social Post and push it forward. I agree Social Post Facebook should be a priority, but we need everyone's help for that to happen.
Comment #10
gnugetHi @gvso.
In the branch 1.x it is possible to set custom permissions and adding code similar as #8 is possible to publish on pages, so the branch 1.x is more or less at the same point as 2.x. but besides that, no new development has been made on the 1.x (because I thought the branch 2.x was the way to go so I stopped the development of the 1.x branch because I didn't know what were the plans).
Last week I reviewed and merged some patches on the 2.x:
And I was planning this week start working on providing a UI to #8 so everyone can use it without the need to write too much custom code but if you have different plans just let me know (Let me know if I should stop reviewing/working on the branch, in theory, I'm not the maintainer I just wanted to help)
Comment #11
gvsoOh wait. I didn't actually notice you were updating 2.x. Thanks for that! Last time I checked, it was very behind what's expected. FYI, I have only added new features to 2.x and restrict myself to only solve bugs in 1.x.
I haven't checked 2.x code, but I already noticed that it has two dependencies:
We should only use one of them. Although I have a preference over PHP The League because most projects are using it, I am fine if you decide to use Facebook's official library.
Comment #12
gnugetHi @gvso.
I've been discussing with Joshua about this module the last few weeks and we think that this module should depends on
social_auth_facebook
for linking the accounts to facebook and remove the auth code from this module, what do you think? it would be possible without touching too much thesocial_auth_facebook
code?I'm aware that the auth module is already on Beta so i don't want to alter it too much.
Comment #13
gvsoTL;TR You can do it, but Social Auth implementers were not developed with this use case in mind.
It is true that is technically possible to depend on Social Auth Facebook for this. However, by design, Social Auth modules already gives you options that you might not need for Social Post (the settings form and menu link in admin page for instance). This might confuse people.
Yes, we might consider this a lack of good design, but Social Post was not initially developed with the idea of having as many implementers as Social Auth. There are only a few providers that you might want to post things to or even allow content posting. That's the reason we didn't initially split the modules into 3: a mere authentication module that can be consumed by Social Auth and Social Post implementers.
Comment #14
joshua.boltz CreditAttribution: joshua.boltz at Mediacurrent commentedAdded patch that adds support for posting media along with a status update to a Facebook page. Similar to https://www.drupal.org/project/social_post_facebook/issues/2988691#comme..., but has changed due to changes in this issue for adding support for posting to a Facebook page.
With this patch, the following can be added into a entity life cycle event, such as hook_entity_insert(), such as when a new node is created.
Comment #15
SocialNicheGuru CreditAttribution: SocialNicheGuru commented