By technikh on
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
I believe there is some
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
but none of these modules
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
I figured out some other way
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
What was your other way
What was your other way please?
regards
Simon
I am re-directing the user
@cymplecy:
I am directing the user to this page to request for the permission.
http://www.facebook.com/connect/prompt_permissions.php?
I followed the article on this page
http://wiki.developers.facebook.com/index.php/Authorization_and_Authentication_for_Desktop_Applications#Prompting_for_Permissions
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