小编Leh*_*zee的帖子

致命错误:未找到"OAuth"类

我正在尝试连接到LinkedIn API但每次我尝试访问它时都会收到以下错误:

致命错误:第8行的/ home/vhosts/* /test.php中找不到"OAuth"类

我在000WebHost上使用免费服务器,我读过免费服务器有时不支持OAuth.我已经在另一个免费服务器上尝试过,我得到了相同的错误消息,所以我的问题是如何检查服务器是否支持使用OAuth?

这是我的代码:

// Fill the keys and secrets you retrieved after registering your app
$oauth = new OAuth("abcd123456", "efgh987654");
$oauth->setToken("abcd1234-efgh987-9988", "9876abcd-123asdf-1122");

$params = array();
$headers = array();
$method = OAUTH_HTTP_METHOD_GET;

// Specify LinkedIn API endpoint to retrieve your own profile
$url = "http://api.linkedin.com/v1/people/~";

// By default, the LinkedIn API responses are in XML format. If you prefer JSON, simply       specify the format in your call
// $url = "http://api.linkedin.com/v1/people/~?format=json";

// Make call to LinkedIn …
Run Code Online (Sandbox Code Playgroud)

php

11
推荐指数
1
解决办法
3万
查看次数

未捕获的TypeError:对象[object Object]没有方法'autocomplete'

我一直在收到错误:未捕获TypeError:对象[object Object]没有方法'autocomplete'.它工作正常,直到几天前我似乎无法找到问题.似乎jquery-ui正在加载,所以我不明白为什么该方法不起作用.

我的代码:

<link href="css/redmond/jquery-ui-1.9.1.custom.css" rel="stylesheet">
<script src="js/jquery-1.8.2.js"></script>
<script src="js/jquery-ui-1.9.1.custom.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(function() {
    $(function() {
        $( "#tags" ).autocomplete({
            source: "autocomplete_members.php?term="+ $("#tags").val()
        }).data( "autocomplete" )._renderItem = function( ul, item ) {
        var inner_html = '<a href="#" onclick="setId(\'' + item.id + '\');"><img src="' + item.img + '" width="40px" height="40px" style="vertical-align: middle;padding-bottom: 2px;padding-right: 4px;" />' + item.value + '</a>';
        return $( "<li></li>" )
            .data( "item.autocomplete", item )
            .append(inner_html)
            .appendTo( ul );
        };
    });
});

function setId(val){
    document.getElementById("member-id-text").value = val;
};
}); …
Run Code Online (Sandbox Code Playgroud)

jquery jquery-ui

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

jquery ×1

jquery-ui ×1

php ×1