自定义Linkedin登录按钮 [英] Customizing Linkedin Login Button

查看:104
本文介绍了自定义Linkedin登录按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将LinkedIn登录实施到我的Web应用程序中. 我正在使用以下脚本:

I'm implementing LinkedIn Login into my web app.. I'm using following script as :

<script type="in/Login"> </script> 

以加载LinkedIn登录按钮.该脚本会自动加载具有修复设计或图像的LinkedIn登录按钮.

to load the LinkedIn Sign In button. This script automatically loads a LinkedIn Sign in button with fix design or image..

但是我想用我的自定义LinkedIn图像自定义一个按钮,并且该按钮应在单击后生成LinkedIn登录事件..也就是说,它应符合脚本的目的

but I want to Customize a button with my custom Image of LinkedIn and this button should generate the LinkedIn login event after clicking on it.. that is it should serve above script's purpose

Plz帮助

推荐答案

执行此操作的其他方法:

Other way to do this:

  1. 放置您喜欢的图像:

  1. Place an image that you like:

<a href=""><img onclick="liAuth()" src="./img/widget_signin.png"></a>

  • 像这样创建JS函数:

  • Create JS function like this:

    function liAuth(){
       IN.User.authorize(function(){
           callback();
       });
    }
    

  • 使用LinkedIn用户数据:

  • Use LinkedIn user data:

    IN.API.Profile("me")
       .fields("firstName", "lastName", "headline")
       .result(resultFunction);
    

  • 这篇关于自定义Linkedin登录按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆