Social Networks
- Overview
- This feature integrates popular social networks (such as Twitter or Facebook) into Tiki. It turns Tiki into a Facebook/Twitter application interacting directly with these networks without using the client's browser.
Adding the Google +1 icon
Go to http://www.google.com/intl/en/webmasters/+1/button/index.html for the latest code. At the time of this writing, the example code was valid. Customize the button using the form on the Google +1 button page. Of the code made on the Google page to copy and paste, the div syntax, such as<!-- Place this tag where you want the +1 button to render --> <div class="g-plusone" data-size="small"></div>
is input where you want the button to be displayed, such as in a user (custom) module.
The JavaScript such as
<!-- Place this render call where appropriate -->
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();goes in the Look and Feel custom JavaScript textarea, pasted as illustrated (the script opening and closing tags shouldn't be input, in Tiki 7 at least).
Further customize by adding the metatag information. As of Tiki 7 there's no way to modify the html tag by adding the itemscope and itemtype attributes, but a future release of Tiki should have this functionality.
Using Twitter and Facebook in Shoutbox
When the site has been registered with Twitter and/or Facebook, an admin can allow the Shoutbox module to show two additional checkboxes by setting the options "Tweet" and "Facebook".If the user has the permission to use Twitter/Facebook and has authorized the site to send tweets or post to his Facebook wall, the Shoutbox will offer a checkbox Tweet with Twitter and a checkbox Post on Facebook wall. By activating these checkboxes, in addition to sending a shout, the message will also be sent by Twitter or posted on your Facebook wall.
Using Twitter and Facebook to share a page
When the above prerequisites are given, a user who authorized the site with Twitter/Facebook can use the Share feature not only to send emails/internal messages, but also tweet them and like those pages on his Facebook wall.- To setup/activate
- Click the Social Networks icon
on the Admin Panel
or
Access http://yourdomain.com/tiki-admin.php?page=social
- Note
- The following content will eventually be migrated to the Social Networks section of the Tiki User and Admin Guides.
Activate Twitter integration
First of all, go to the Twitter page for new applications and register your site as a new application.As Callback URL you must give the URL for tiki-socialnetworks.php on your site. This is where users will be redirected when authorizing your app with oauth.
You also must ask for the access type Read & Write otherwise your users will not be allowed to tweet.
After registering your site, you get a consumer key and consumer secret which you must enter in the tab Social networks on the admin panel. If that tab is disabled, turn on the feature Social networks on the features page first.
To grant a group access to the social networks functionality, set the permission user can use social network integration (tiki_p_socialnetworks) for that group on the Permissions page.
User authorization
Before being able to use the Twitter integration, users must authorize the TikiWiki site by requesting an oauth token.This can be done via the Social networks tab on My Tiki.
By clicking on the Authorize button, the user will be redirected to the Twitter page, asking for confirmation. If the user agrees, an oauth token will be stored in the users preferences.
Setting up Facebook integration
First, you need to register a new application with Facebook. This can be done via the Developers tool. Later on, you can edit the Application via Application settings in your Facebook profile.Step 0
On the Developer page click on Set Up New Application and enter a name for your Application, sell your soul (agree to the terms) and click on Create Application. After a successful captcha check, you can proceed with step 1.You may need to login in Facebook to accept the validation process in Facebook (to allow the developer application use your account details in Facebook, etc).
Step 1
The name of your application is already set, so you don't need to enter a new one. Feel free to upload a logo and icon for your app. As I give support via e-Mail, I entered my email address for the users support.Step 2
Enter the site URL and the Site Domain. My test server is at test.ott-consult.de and tiki is at the URL for my test server is at http://test.ott-consult.de/trunk. The Site URL therefore is http://test.ott-consult.de/trunk/tiki-socialnetworks.php?request_facebook.Step 3
In this step, you don't to change anything since the Post-Authorize Callback URL field has been removed by Facebook.
Step 4
Here, you choose the way your application authorizes with Facebook. As it is set by default, just check that HTML5/mobile web for your Application type is selected.Step 5
Start Using Facebook Credits, this financial/billing integration mostly not needed for Tikiwiki, leave it that way.Step 6
On this last step, you can give the Facebook Deauthorize Callback which will be called, when a user disallows your application on Facebook. Don't choose sandbox mode here.Usually, your web server has a static IP address. By putting it on the server whitelist, you can add a bit of security, as only requests from that IP will be processed. If you run a server farm with multiple servers, add all IP addresses.
You can also uncheck all the "deprecated" setting, it won't hurt.
Now you created the application at Facebook and you can enter the data on your tiki server. Go to Admin->Social networks and enter the data from Facebook.
User authorization
Users need the tiki_p_social_network permission in order to use social networks. To login via facebook, the Anonymous group will need this permission.
Before being able to use the Facebook integration, users must authorize the TikiWiki site by requesting an oauth token.
This can be done via the Social networks tab on My Tiki.
Note : As i (Bernard) authorize it i encounter an error from Facebook servers: "message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.".
I had to logout/login for Facebook to accept the authorization. It is possible also that you have to wait more than 15mn for the Facebook server to use the setting you just entered.
I had to logout/login for Facebook to accept the authorization. It is possible also that you have to wait more than 15mn for the Facebook server to use the setting you just entered.
Setting up bit.ly as URL shortener
At the moment, this is only used by the Share feature. By going to bit.ly, you can register and request a key. As Admin, you can force all users to use the site wide key which gives you a nice overview on the pages shared by your users and the feedback on that.Using ShareThis
You can also allow your users to send links from pages in your tiki to many social networking sites by means of the widget from ShareThis (http://www.sharethis.com).Since Tiki6 the widget "share this" is also available in blog posts if you enable it at: "Admin home > Blogs > General Settings > Sharing on social networks > ShareThis buttons"
And since Tiki6.1, it's also available for articles: "Admin home > Articles > General Settings > Sharing on social networks > ShareThis buttons"
In trackers, you can use the widget "Share This" by means of adding a call to PluginShareThis in a static text field.
SocialNetwork | SocialNetworks | Social Network | Twitter | Facebook
