When on the application page, click on 'Add to My Page' on the left-hand menu, select the page. Head to the application's page, you can see this by clicking on 'about' in Site Building -> Facebook applications -> List on your app, or simply go to. Install the application into your Facebook page. You may also wish to restrict which types of content are posted to Facebook, you can do this on the configuration page. If you wish to post on the page wall as yourself, or, on your own wall, please look at the configuration page and set the target_id and user_id accordingly. If you wish to post custom media types (images/videos/etc) please look in the attachments section of the module code and program accordingly. You will need to head to the Drupal menu item - 'Site Configuration -> Facebook Wall Post' to set your configuration items. I have included a sample module that will do the job at the bottom of this post. The documentation is sketchy and out of date with conflicting instructions based on different versions of Facebook requirements.ĭownload and enable your custom Facebook Wall Post module (example at base of this article). This is the tricky part where many people fall over. Install and configure your custom Facebook Wall Post module. Then, when logged in as the account you wish to link (I use the admin account), click on the Facebook Connect icon and then login to Facebook on the popup allowing the application access.ĭouble check at this point that all the things you ticked in 'Extended Permissions' are showing, if they are not, if it is just 'access my basic information', then you need to go back and edit the app to enable the extended permissions mentioned in step 5. You will need to place the Facebook Connect block somewhere you can get at it, so head to Site Building -> Blocks > List and place the Facebook Connect block in footer or right sidebar (depending where you want it). Connect your Drupal account to your Facebook account. Head to Site Building -> Facebook Applications -> Facebook Connectįrom the dropdown, select your new application and save. Link your application to Facebook Connect. Under 'Facebook Connect' ensure that the Primary checkbox is ticked. Under 'Facebook Extended Permissions -> Required Extended Permissions', tick the boxes for 'Offline Access', 'Publish to my Wall' and 'Manage Pages'. Head to Site Building -> Facebook Applications -> Add App.įill out a label, put in your previous App ID and App Secret, ensure 'enabled' is ticked. Create Your Application in Drupal for Facebook Or, depending where you install your modules, this might beĪll of these settings (step 4) are in the readme.txt in the root of the directory of the Facebook module, if stuck, that's your first stop! 5. Include "sites/all/modules/fb/fb_settings.inc" Include "sites/all/modules/fb/fb_url_rewrite.inc" You need to add these two lines to the bottom of your settings.php file Language ?>" lang="language ?>" dir="dir ?> xmlns:fb=""> You need to add 'xmlns:fb=""' at the end of your theme's opening html tag. You will also need to enable the Facebook Extended Permission module in the Drupal for Facebook - Contrib modules fieldset. Got to your Site Building -> Modules -> List and enable all the Drupal for Facebook modules. Enable and configure Drupal For Facebook in Drupal. sites/all/libraries/facebook-php-sdk/src/ and then the individual files. You will need to place the unzipped 'src' directory so that the directory structure looks like :. We have had the most joy with the 2.2 version. Download and install the Facebook SDK.īe sure to dowload a version earlier than 3.0 as the latest versions are not compatible. In the normal manner, downloading, unpacking and putting in your modules directory. Make note of your 'App ID' and your 'App Secret'. The profile image you upload will appear on the application page. The icon you upload will be the icon that appears at the base of each Facebook wall post, beside the details. Head to and create an application with bare minimum details. So, with scant documentation on this very important piece of functionality I thought I'd post a 'how to' on this one - you want to automatically push content from your Drupal site, into a Facebook wall, fan page or company page, and you want to do this as the page itself rather than as your user? We will be updating the how-to shortly to take account of the new API and with a Drupal 7 example ! NOTICE ! ! NOTICE ! Facebook have depreciated their old SDK that powered the Drupal for Facebook functionality discussed in this post, so at present, this will not work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |