Getting started:
Related tutorials:
Getting started:
Related tutorials:
| public function actionLogin() { | |
| $linkedinBase = new LinkedinBase(); | |
| $linkedIn = $linkedinBase->linkedInObj; | |
| try { | |
| $authenticated = $linkedinBase->isAuthenticated(); | |
| if ($authenticated) { | |
| $attr = $this->formatAttributes($authenticated); | |
| if (!empty($attr['profile']['emailAddress']) && !empty($attr['profile']['name'])) { | |
| $user = new Users(); |
| Class FacebookController () | |
| { | |
| public function actionPost() { | |
| $req = Yii::$app->controller->action->id; | |
| $message = Yii::$app->request->post('message'); | |
| // store the message in $_SESSION | |
| $this->authenticate($req); | |
| } | |
| private function authenticate($req) { |
| // Note :: only use the below mentioned scope. Do not add Plus.login scope,as it conflicts with the permission | |
| <?php | |
| namespace common\components\google; | |
| define('APPLICATION_NAME', '{Your Application Name}'); | |
| define('CREDENTIALS_PATH', '~/.credentials/people.googleapis.com-php-quickstart.json'); | |
| define('CLIENT_SECRET_PATH', __DIR__ . '/client_secret_2.json'); // credential.json |