I want to publish a post on Facebook when the user views the node without interrupting the user
For this I setup an IFRAME facebook application and directed to my website
on hook_view function I called this

$path = 'XXX';
require_once $path;
$appapikey = 'XXX';
$appsecret = 'XXX';
$facebook = new Facebook($appapikey, $appsecret);
$user_id = $facebook->require_login();

if (!$facebook->api_client->users_hasAppPermission("publish_stream")){  
 
 }
else
{
	$message = 'XXX'; 
	$facebook->api_client->stream_publish($message);
}

the problem is, how should I request user to grant extended permission ('publish_stream')?
can anyone please help me with this.
Any suggestions would be appreciated!

Comments

devenderdagar’s picture

I believe there is some facebook status and facebook connect modules, out of these two one does the same work if you want to publish your nodes at facebook.

Cheers

Devedner

technikh’s picture

but none of these modules post automatically. you need to click on a link and type the message. whereas my requirement is to post automatically without interrupting the user. So I guess I can't use these modules.

Cheers,
TechNikh

In 30 seconds set up Automated Visual testing of your website. Zero coding. https://drupal.org/project/drulenium
Ever dreamed of styling your view, We have a solution for you. https://drupal.org/project/views_stylizer

technikh’s picture

I figured out some other way by directing the user to facebook extended permissions page.
thanks devenderdagar, for your reply..

Cheers,
TechNikh

In 30 seconds set up Automated Visual testing of your website. Zero coding. https://drupal.org/project/drulenium
Ever dreamed of styling your view, We have a solution for you. https://drupal.org/project/views_stylizer

cymplecy’s picture

What was your other way please?

regards

Simon

technikh’s picture

Cheers,
TechNikh

In 30 seconds set up Automated Visual testing of your website. Zero coding. https://drupal.org/project/drulenium
Ever dreamed of styling your view, We have a solution for you. https://drupal.org/project/views_stylizer