我不能使用LinkedIn的所有成员配置文件,我只想将我们的公共配置文件放到我们的配置文件部分中:
我可以使用php来完成这个任务,这一切都很好,只不过它破坏了我的页面上的jQuery,因此选项卡和它们的内容无法工作。
function getProfileDivs ($dbc, $pg) {
$q6 = "SELECT * FROM profilelinks WHERE parent='$_GET[title]' AND status=1 ORDER BY id ASC ";
$r6 = mysqli_query($dbc, $q6);
if ($r6) {
while ($link2 = mysqli_fetch_assoc($r6)) {
$thread=$link2['label'];
echo "<div id='".$thread."'>";
if ($thread=='Profile') {
$profile= $_GET['title'];
profilePost ($dbc, $pg);
echo '<div id="linkedin">';
include ('http://www.linkedin.com/in/abstrkt'.$profile.'');
echo '</div>';
}elseif ($thread=='Mixcloud'){
echo '<h2>'.$thread.'</h2>';
personalBlogs ($dbc, $pg, $thread);
echo "<script src='http://widget.mixcloud.com/media/js/follow_embed.js'></script>";
}else{
echo '<h2>'.$thread.'</h2>';
personalBlogs ($dbc, $pg, $thread);
}
echo '</div>'; }//create Divs dynamicallly CLOSE
}//get Div Id's from table and display CLOSE
}我如何隔离LinkedIn HTML,使其只影响它所在的这个称为DIV的配置文件,从而仍然使我的选项卡正常工作?
目前,它也影响到全球CSS。
下面是完全不起作用的iframe代码,它只是一个空白框:
if ($thread=='Profile') {
$profile= $_GET['title'];
profilePost ($dbc, $pg);
echo '<div id="linkedin">';
echo '<iframe src="http://www.linkedin.com/in/abstrkt'.$profile.'" width="100%" height="450px" scrolling="yes"></iframe>';
//include ('http://www.linkedin.com/in/abstrkt'.$profile.'');
echo '</div>';
here is what the iframes look like on view source of the page for the whole tabs structure, everything works like this except the 1st linkedin iframe:
<div id="MainContent" class="background1"> <div id="ProfileStructure" class="ProfileStructure"><ul><li><a href=#Profile>Profile</a></li><li><a href=#Soundcloud>Soundcloud</a></li><li><a href=#Mixcloud>Mixcloud</a></li><li><a href=#Vimeo>Vimeo</a></li><li><a href=#Programming>Programming</a></li></ul><div id='Profile'><div id="linkedin"><iframe src="http://www.linkedin.com/in/abstrktRobbie" width="100%" height="450px" scrolling="yes"></iframe></div></div><div id='Soundcloud'><h2>Soundcloud</h2><div id="blogPosts">
<table>
<tr><h3>Soundcloud by Robbie</h3></tr>
<tr><iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Fusers%2F4985712&color=8267c9&auto_play=false&show_artwork=true"></iframe></tr>
</table> <br></br></div></div><div id='Mixcloud'><h2>Mixcloud</h2><div id="blogPosts">
<table>
<tr><h3>Mixcloud by Robbie</h3></tr>
<tr><div><object width="100%" height="480"><param name="movie" value="//www.mixcloud.com/media/swf/player/mixcloudLoader.swf?feed=http%3A%2F%2Fwww.mixcloud.com%2FEnnoia_Delusions_of_Self%2F%3Flimit%3D10&embed_uuid=90a1ce18-e71a-45f4-825f-c2097e674728&stylecolor=&embed_type=widget_standard"></param><param name="allowFullScreen" value="true"></param><param name="wmode" value="opaque"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.mixcloud.com/media/swf/player/mixcloudLoader.swf?feed=http%3A%2F%2Fwww.mixcloud.com%2FEnnoia_Delusions_of_Self%2F%3Flimit%3D10&embed_uuid=90a1ce18-e71a-45f4-825f-c2097e674728&stylecolor=&embed_type=widget_standard" type="application/x-shockwave-flash" wmode="opaque" allowscriptaccess="always" allowfullscreen="true" width="100%" height="480"></embed></object><div style="clear:both; height:3px;"></div><p style="display:block; font-size:12px; font-family:Helvetica, Arial, sans-serif; margin:0; padding: 3px 4px; color:#02a0c7; width:auto;"><a href="http://www.mixcloud.com/Ennoia_Delusions_of_Self/?utm_source=widget&utm_medium=web&utm_campaign=base_links&utm_term=resource_link" target="_blank" style="color:#02a0c7; font-weight:bold;">Latest Ennoia's Cloudcasts</a><span> on </span><a href="http://www.mixcloud.com/?utm_source=widget&utm_medium=web&utm_campaign=base_links&utm_term=homepage_link" target="_blank" style="color:#02a0c7; font-weight:bold;"> Mixcloud</a></p><div style="clear:both; height:3px;"></div></div>
<div style="clear:both; height:3px; width:auto;"></div><p style="display:block; font-size:12px; font-family:Helvetica, Arial, sans-serif; margin:0; padding: 3px 4px; color:#f3eaf5; width:auto;"><a href="http://www.mixcloud.com/Ennoia_Delusions_of_Self/?utm_source=widget&utm_medium=web&utm_campaign=base_links&utm_term=resource_link" target="_blank" style="color:#f3eaf5; font-weight:bold;">Latest Ennoia's Cloudcasts</a><span> on </span><a href="http://www.mixcloud.com/?utm_source=widget&utm_medium=web&utm_campaign=base_links&utm_term=homepage_link" target="_blank" style="color:#f3eaf5; font-weight:bold;"> Mixcloud</a></p><div style="clear:both; height:3px;"></div>
<a class="mixcloud-follow-widget" href="http://www.mixcloud.com/Ennoia_Delusions_of_Self/" data-h="160" data-w="315" data-faces="on">Follow Ennoia on Mixcloud</a></tr>
</table> <br></br></div><script src='http://widget.mixcloud.com/media/js/follow_embed.js'></script></div><div id='Vimeo'><h2>Vimeo</h2><div id="blogPosts">
<table>
<tr><h3>Vimeo by Robbie</h3></tr>
<tr><iframe src="http://player.vimeo.com/hubnut/user/user2484971/uploaded_videos?color=000000&background=ffffff&slideshow=0&video_title=1&video_byline=1" height="450" width="100%"></iframe></tr>
</table> <br></br></div></div><div id='Programming'><h2>Programming</h2><div id="blogPosts">
<table>
</table> <br></br></div><div id="blogPosts">
.<br></tr>
</table> <br></br></div></div></div> </div>编辑3
下面是直接从linkedin站点复制的api页面,其中包含我的api密钥号,这给了我这个错误:
'); IN.parse(document.getElementById("profile")) }) }在我看来,这是“打开或关闭的东西,然后它看不出来.在dreamweaver中,该行上没有语法错误或任何东西,但是第6行,其中键有一个没有意义的.开头的数字5是红色的,但是如果我自下而上构建这个,我可以让你罗比·米勒出现,但是一旦我在JS中构建了它所要求的配置文件div,它就这样做了。
<html>
<head>
<title>Profile App Example</title>
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: 5m5y1ybx85gp
authorize: true
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5b1.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js"></script>
<script type="text/javascript">
function loadData() {
IN.API.Profile("me")
.result(function(result) {
$("#profile").html('<script type="IN/FullMemberProfile" data-id="' + result.values[0].id + '"></script>');
IN.parse(document.getElementById("profile"))
})
}
</script>
</head>
<body class="yui3-skin-sam yui-skin-sam">
<div id="profile"></div>
<script type="IN/Login" data-onAuth="loadData"></script>
</body>
</html>`发布于 2013-08-12 18:45:29
你可以像Diodeus说的那样把它放到iFrame中,或者你可以跟随Linkedin自己的帮助
id/85
它描述了帮助提升你的个人资料的方法。大多数人只是在他们的网站上有一个链接到他们的个人资料或他们的公司页面。
更新:看起来像是框架造成了跨源问题。
所以唯一真正的解决办法就是使用Linkedin工具
https://stackoverflow.com/questions/18192611
复制相似问题