Social stream for Facebook and Twitter and share buttons
<link rel="stylesheet" href='../../HTWF/scripts/social.stream.css'> <script src='../../HTWF/scripts/social.stream.min.js'></script>
<div class="social-feed-fb no-comments" data-social-id="156149777783739" data-options="limit:3"></div>
<div class="scroll-content well" data-height="400"> <div class="social-feed-fb" data-social-id="156149777783739" data-options="limit:8"></div> </div>
<div class="social-feed-fb flexslider no-comments outer-navs" data-social-id="156149777783739"></div>
<div id="fb-carousel-demo" class="social-feed-fb flexslider carousel outer-navs" data-social-id="156149777783739" data-options="minWidth:250,limit:8"></div>
Name | Type | Description |
---|---|---|
HTML initialization | Mixed |
1 ) Add class social-feed-fb and attribute data-social-id="id-facebook-page" to target element.You can found the Facebook ID with this web service : findmyfbid.com. 2 ) Set the Facebook access token, see below documentation for more details. Use class no-comment to hide post comments.
|
Javascript initialization | Javascript |
$(document).ready(function () { $('#target').facebook_wall({ id: 'id-facebook-page', access_token: 'access-token', limit: 3, locale: "it_IT", show_guest_entries: false }); }); |
Access token | Mixed |
To start the Facebook stream you must set the Facebook access token: 1 ) Go to developers.facebook.com, login with your account and register as developer. Otherwise you can not add your application and get tokens. 2 ) Choose on the navigation bar Apps > Add a New App and select website. 3 ) Type in any name of your App and click Create New Facebook App ID, select a category, and click Create App ID. 4 ) You will be redirected to the next page. Fill in URL of your site and click Next, then click Skip to Developer Dashboard. 5 ) Go to developers.facebook.com/tools/accesstoken/, find you newly created app and click You need to grant permissions to get an Access token, the Facebook access tokens are both two but best is App Token. Now you must insert access token to your stream, you can do in three ways: 1 ) With attribute data-token="access-token" .
Example: <div class="social-feed-fb" data-token="8SBmJBp2bUv4dXTjM"></div> .2 ) With attribute data-options="access_token:access-token" .3 ) By setting Javascript variable facebook_token="access-token" , you can found it on script ../../HTWF/scripts/social.stream.min.js ,
or you can set it in any script you want.
|
Scroll box | Mixed |
To insert the stream into a crollable box you must use the scroll box component and insert the Facebook stream code into <div class="scroll-content"> ... </div> .
Plugin dependencyThis feature require Slim Scroll Plugin ( |
Slider and carousel | Mixed |
To show a slider or carousel you must use the sliders component and the code of examples above.
Plugin dependencyThis feature require Flex Slider Plugin ( |
Translations | Javascript |
You can translate the main texts of the stream by passing an array on initialization, use this code:
$(document).ready(function () { $('#target').facebook_wall({ id: '156149777783739', access_token: 'access_token', locale: "en_EN", text_labels: { shares: { singular: "Shared % time", plural: "Shared % times" }, likes: { singular: "% Like", plural: "% Likes" }, comments: { singular: "% comment", plural: "% comments" }, like: "Like", comment: "Write comment", share: "Share", days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], months: ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"] } }); }); Currently you can use translations only with Javascript initialization. |
<link rel="stylesheet" href='../../HTWF/scripts/social.stream.css'> <script src='../../HTWF/scripts/social.stream.min.js'></script>
<div class="social-feed-tw" data-social-id="envato" data-options="limit:3"></div>
<div class="scroll-content well" data-height="250"> <div class="social-feed-tw" data-social-id="breakingbad_amc" data-options="limit:8"></div> </div>
<div class="social-feed-tw flexslider outer-navs" data-social-id="breakingbad_amc" data-options="show_media:false"></div>
<div class="social-feed-tw flexslider carousel outer-navs" data-social-id="breakingbad_amc" data-options="minWidth:250,show_media:false,limit: 10"></div>
Name | Type | Description |
---|---|---|
HTML initialization | Mixed |
Add class social-feed-tw and attribute data-social-id="twitter-username" to target element.You can found the Twitter username by URL of the twitter page. For example the username of page with URL https://twitter.com/BreakingBad_AMC is breakingbad_amc. |
Javascript initialization | Javascript |
$(document).ready(function () { $('#target').tweecool({ username: 'twitter-username' }); }); |
Scroll box | Mixed |
To insert the stream into a crollable box you must use the scroll box component and insert the Facebook stream code into <div class="scroll-content"> ... </div> .
Plugin dependencyThis feature require Slim Scroll Plugin ( |
Slider and carousel | Mixed |
To show a slider or carousel you must use the sliders component and the code of examples above.
Plugin dependencyThis feature require Flex Slider Plugin ( |
Social share buttons
Classic
ShareClassic big
Circle Toolstip
Simple icons
Social button
Usage
Main settings
data-social="share-socialnetwork-name"
to target object. Currently supported social networks are four:data-social="share-facebook"
data-social="share-twitter"
data-social="share-google-plus"
data-social="share-linkedin"
data-social-url="socialnetwork-link"
to target object.$("*[data-social]").each(function () { ... });
of script../../HTWF/scripts/script.js
../../HTWF/scripts/bootstrap/js/bootstrap.popover.min.js
.../../HTWF/css/animations.css
.To show icons on bottom add class
bottom-icons
to social button object. Example<div class="social-group-button bottom-icons"> ... </div>
.To set vertical line design add class
social-line
to social button object. Example<div class="social-group-button social-line"> ... </div>
.social-colors
to btn-group container.