HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Facebook Publishing

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#62382 (In Topic #13568)
Avatar

Community saint

Hello! I'm at the point where my OCP5 site is ready to roll, however, I cannot find any documentation related to publishing to Facebook. The screen actions block is self explanatory and good to go. What I can't find is how to use the API stuff to publish to my FB wall. API key and other details are locked and loaded in config…now what? ;-)

Thanks!

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#62419
Avatar

Hi,

I didn't develop this myself and I'm not sure I've used it personally but I think it should just be a case of generating and entering those details and then it working when you add news (I think you have to check a setting on the add news form too).

We have had some problems with Facebook having bugs or their API changing, so if it's not working it could be related to that.

There is another way to integrate to Facebook. Facebook can take RSS feeds (I think via the 'notes' app). So you can give it your news RSS feed. Or you can publish to twitter and use your twitters RSS feed.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#62422
Avatar

Community saint

Hi Chris! Thanks for the input. I've looked around for a checkbox for publishing, which I couldn't find, as well as looking into the the code for same (sources/facebook & facebook_publish.php), however, the function(s) don't appear to be called during the publish/submit. I'll peak into the error logs to see if it's silently failing as well as investigate using the notes to publish instead.

Be well, TR

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#62430
Avatar

Ah, I was mistaken about there being an option on the add news form.

When the news is added, facebook_wall_news_update in sources/news2.php is called.

It only goes to Facebook if it is validated and if the news category is accessible to guests.

If it still won't work, the code may have stopped working.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#62436
Avatar

Community saint

Thanks Chris! I'll take a peak and see if I can determine if things are blowing up.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#62439
Avatar

Community saint

Maybe a clue, not sure. I was adding an event to the ocPortal calendar and was presented with this upon submit (error did not prevent the addition of the event to calendar):

php said

PHP ERROR [1] Uncaught exception 'FacebookRestClientException' with message 'The user hasn't authorized the application to perform this action' in /home/soccerda/public_html/sources/facebook/facebookapi_php5
_restlib.php:3045 Stack trace: #0 /home/soccerda/public_html/sources/facebook/facebookapi_php5
_restlib.php(885): FacebookRestClient->call_method('facebook.stream…', Array) #1 /home/soccerda/public_html/sources/facebook_publish.php(72): FacebookRestClient->stream_publish('Tedzplace event…', Array, Array, '841960376', '841960376') #2 /home/soccerda/public_html/sources/calendar2.php(372): publish_to_FB('Tedzplace event…', 'Blueberry Bash …', NULL, NULL, ', On Date: 15 J…', Array, Array, Array) #3 /home/soccerda/public_html/sources/calendar2.php(122): facebook_wall_event_update(1, 'Blueberry Bash …', ', On Date: 15 J…', 1, 2, false) #4 /home/soccerda/public_html/cms/pages/modules/cms_calendar.ph
p(458): add_calendar_event('', '', '', 2, 'none', NULL, 0, 'Blueberry Bash …', '', 2, 1, 2011, 7, 16, 1, 0, 2011, 7 in /home/soccerda/public_html/sources/facebook/facebookapi_php5
_restlib.php on line 3045 (version: 5.0.1, PHP version: 5.2.13, URL: /cms/index.php?page=cms_calendar&type=_ad&uploading=1&keep_f
orum_root=8)

Expand: Stack Trace Stack Trace


"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: