我正在努力 share a YouTube link on user wall with LinkedIn PHP API
。我正在尝试使用“ linkedin_3.2.0.class.php
”。我可以给你贴上电子管链接LinkedIn
,它也在播放。但我的问题是,当用户点击标题时,它会重定向到你管上的用户而不是我的 Facebook 应用程序 url。我也在与你们分享我的 scree 和代码。如果可能的话,请指导我哪里做错了。
Here is my PHP Code:
<?php
$OBJ_linkedin = new LinkedIn($API_CONFIG);
$OBJ_linkedin->setTokenAccess($_SESSION['oauth']['linkedin']['access']);
$content = array();
$content['comment'] = $_SESSION['linkedin']['message'];
$content['title'] = $_SESSION['linkedin']['title'];
$content['submitted-url'] = 'http://www.youtube.com/watch?v=Fj7kFvk-T7g';
$content['submitted-image-url'] = Config::BASE_URL . $_SESSION['linkedin']['image'];
$content['description'] = $_SESSION['linkedin']['message'];
$content['url'] = Config::APP_URL;
$content['source'] = Config::APP_URL;
$private = TRUE;
$response = $OBJ_linkedin->share('new', $content, $private);
if ($response['success'] === TRUE) {
header('Location: ' . Config::APP_URL);
die();
} else {
echo "Error sharing content:<br /><br />RESPONSE:<br /><br /><pre>" . print_r($response, TRUE) . "</pre><br /><br />LINKEDIN OBJ:<br /><br /><pre>" . print_r($OBJ_linkedin, TRUE) . "</pre>";
}
Here is my Screen shot: