使用静态密钥链接登录,但动态php密钥不起作用

时间:2018-01-04 07:14:45

标签: php linkedin

我正在使用javascript SDK中的链接实现登录。

我正在动态传递app id(来自数据库)。当我传递密钥static时,链接的按钮工作,但是当我从数据库传递相同的密钥时,它不起作用。

<script type="text/javascript">
    var linkedin_api_id = "<?php echo LINKEDIN_APP_ID; ?>";
    alert(linkedin_api_id); //displays correct key
</script>
<script type="text/javascript" src="//platform.linkedin.com/in.js">
    api_key: linkedin_api_id //here static key works but passing variable does not work
    authorize: false
    onLoad: onLinkedInLoad
    scope: r_basicprofile r_emailaddress
</script>

显示按钮的代码:

<script type="in/Login"></script> <!--this displayed when key passed statically but does not displayed when passed the same key from database-->

0 个答案:

没有答案