GithubHelp home page GithubHelp logo

dheia / wn-twitter-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wintercms/wn-twitter-plugin

0.0 0.0 0.0 50 KB

Twitter integration plugin for Winter CMS

License: MIT License

PHP 90.85% HTML 9.15%

wn-twitter-plugin's Introduction

Twitter integration plugin

This plugin adds Twitter integration features to the Winter CMS.

This plugin allows you to add the following Components to your pages and layouts:

  • A Twitter Favourites list*
  • A Twitter Follow Button
  • A Twitter Tweet Button
  • A Twitter Embedded Tweet area
  • A Twitter Embedded Timeline area
  • Requires OAuth security

Configuring

Some features of Twitter use OAuth security. In order to use the plugin you need create a Twitter API application.

  1. Go to the Twitter Developers website to create a new application. You must be signed into Twitter in order to access the page.
  2. Click the Create New App button.
  3. Enter any application name, for example Winter CMS Twitter Integration.
  4. Provide a description for the application.
  5. Enter the website URL where the Twitter integration is going to be used.
  6. Read and agree to the "Rules of the Road"
  7. After the application is created, navigate to the API Keys tab and click the "Create my access token" button. Generating the access token could take some time. Keep refreshing the page until you see the "Your access token" section with the token and token secret strings.
  8. Return to the Winter CMS back-end and navigate to the Settings page.
  9. Click Twitter icon. Enter the API access information from the Twitter application page to the Twitter settings page in Winter CMS.
  10. Save the settings.

Displaying favorite Twitter messages

The plugin includes a component Favorites that lets you to output your favorite twitter messages on a page. Add the component to your page and render it with the component tag:

{% component 'twitterFavorites' %}

You can manage the number of favorite messages with the component settings. If you don't like the default favorite messages markup, don't use the component tag and just write your own code:

{% for favorite in twitterFavorites.all %}
    <blockquote>“{{ favorite.text_processed|raw }}”</blockquote>

    <p class="author">
        <img src="{{ favorite.user.profile_image_url_https }}"/>
        <span>{{ favorite.user.name }}</span>
        <a href="{{ 'http://twitter.com/'~favorite.user.screen_name }}">@{{ favorite.user.screen_name }}</a>
    </p>
{% endfor %}

See Twitter favorites API documentation for the information about available fields.

wn-twitter-plugin's People

Contributors

acasar avatar alekseybobkov avatar daftspunk avatar jonpxpx avatar luketowers avatar mjauvin avatar mohsin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.