Code Monkey home page Code Monkey logo

wp-twitter-login's Introduction

Register in Wordpress with Twitter account (Wordpress plugin)

Wordpress Login is a Wordpress plugin that will allow users to register into a Wordpress website with a Twitter account in one single click.

How it works?

See Wordpress with Twitter account Full Documentation for full documentation

Installation

  1. Download the plugin and upload it to your plugins folder as you would do with any other Wordpress plugin

  2. Create a new app at Twitter here

  3. Copy the Consumer Key and Consumer Secret and paste them in twitterlogin.php

  4. Change the $salt variable to something long and complicated

  5. Optionally, you can change the username prefix to something else to increase security

To see if a user is logged in through Twitter run is_user_logged_in() and then check if the username matches the Twitter prefix (tw- by default).

Retrieving user information

To retrieve the current user's data do something like this:

global $current_user;
get_currentuserinfo();
echo 'Hello ' . $current_user->nickname;
echo 'User token: ' . $current_user->oauth_token;
echo '<img src="' . $current_user->profile_image_url . '" alt="" />';

To retrieve data from someone else do something like this:

$user_info = get_userdata($user_id);
echo 'Username: ' . $user_info->nickname;

More information at Wordpress with Twitter account Full Documentation.

wp-twitter-login's People

Contributors

luckyshot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

timersys

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.