我无法将自定义参数发送到我的Facebook粉丝页面选项卡.
我正在使用PHP并正在传递这样的:
http://www.facebook.com/pages/ {page-name} /?sk = APP_ID&pass = 1
但我无法读取参数传递
Sreejith
我希望优化我的Facebook应用程序.
今天我用四个图形API调用进行批量调用:
/me
/me/friends
/me/likes
/me/feed
Run Code Online (Sandbox Code Playgroud)
如果我使用字段扩展将此更改为单个图形API调用,如下所示:
/me?fields=id,name,username,friends,likes,feed
Run Code Online (Sandbox Code Playgroud)
对于速率限制目的,这现在算作对API而不是四次?
这听起来像一个非常简单的问题,但我找不到答案.
我有一篇来自textarea的帖子.我想使用当前的facebook php库来执行以下操作...
$description = $_POST['textarea_description'];
//magic happens
$attachment = array(
'access_token' => $token,
'message' => "$title",
'picture' => "$image_url",
'link' => "$action_link",
'name' => "$action_label",
'caption' => "$caption",
'actions' => $action_json,
'description' => "$description",
);
$facebook->api('/'.$my_uid.'/feed', 'POST', $attachment);
Run Code Online (Sandbox Code Playgroud)
并让它工作.现在它似乎忽略了
<br> <br /> \n \r \n\r \r\n
Run Code Online (Sandbox Code Playgroud)
但我相信我可能已经做了一些事情来搞砸我的测试......我只需要用有效的东西取代'魔术发生'.现在它只是将我投掷的所有新行转换为空格.非常令人沮丧.facebook论坛上有人建议添加所有内容......但这对我来说似乎不起作用
谢谢,-FT
我想从Facebook获取基本用户信息,但在以下代码中遇到一些问题
-(void)checkForAccessToken:(NSString *)urlString {
NSError *error;
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"access_token=(.*)&" options:0 error:&error];
if (regex != nil) {
**NSTextCheckingResult *firstMatch = [regex firstMatchInString:urlString options:0 range:NSMakeRange(0, [urlString length])];
if (firstMatch) {
NSRange accessTokenRange = [firstMatch rangeAtIndex:1];
NSString *accessToken = [urlString substringWithRange:accessTokenRange];
accessToken = [accessToken stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[_delegate accessTokenFound:accessToken];
}**
}
}
Run Code Online (Sandbox Code Playgroud)
在firstMatch中我得到NULL,这就是为什么[_delegate accessTokenFound:accessToken]; 这种方法不会被调用.
任何人都可以帮助我,以便我能够从Facebook用户信息
提前致谢.
iphone facebook fbconnect facebook-graph-api facebook-ios-sdk
我想基于javascript变量动态更改下面的fb评论插件的data-href.我正在运行一个flash swf文件,并通过javascript函数将data-href的新链接传递给html包装器.当我这样做时,我希望fb comments插件刷新到新的data-href链接.
<div style="float: left; padding-left:5px; min-height:500px" class="fb-comments" data-href="www.example.com" data-num-posts="20" data-width="380"></div>
Run Code Online (Sandbox Code Playgroud)
调用javascript函数传递注释插件的新链接:
function changeCommentsUrl(newUrl){
// should refresh fb comments plugin for the "newUrl" variable
}
Run Code Online (Sandbox Code Playgroud) javascript flash facebook-javascript-sdk facebook-social-plugins
我想在我的网页上实现一个类似的按钮.标题部分包含相关的元标记:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://ogp.me/ns/fb#" >
<head>
<title>
What have you for the world today - Blogs by Antezen
</title>
<link rel="shortcut icon" href="/images/favicon3.ico" type="image/x-icon">
<link rel="icon" href="/images/favicon3.ico" type="image/x-icon">
<meta name="description" content="It was a sunny afternoon..<br>">
<meta property="og:site_name" content="Antezen" />
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Beginning of a new chapter" />
<meta property="og:url" content="http://antezen.com/blogs/1" />
<link rel="canonical" href="http://antezen.com/blogs/1">
<meta property="og:image" content="http://www.antezen.com/system/pics/645/medium/photo.jpg?1337587175" />
<link rel="image_src" href="http://www.antezen.com/system/pics/645/medium/photo.jpg?1337587175">
<meta property="og:description" content="It was a sunny afternoon..<br>" /> …Run Code Online (Sandbox Code Playgroud) 我有时只会得到这个错误 - 似乎有时只会发生这种错误.如果我刷新页面,它似乎自我修复.有任何想法吗?
The request was aborted: Could not create SSL/TLS secure channel.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
Run Code Online (Sandbox Code Playgroud)
从这段代码:
string ThirdURL = "https://api.facebook.com/method/users.getInfo?uids=" + FacebookUserID + "&client_id=" + AppCode.Facebook.APPLICATION_ID + "&access_token=" + AccessToken + "&fields=first_name,last_name,current_location,email,birthday,sex,pic_square,locale&format=json";
HttpWebRequest APIThirdRequest = (HttpWebRequest)WebRequest.Create(ThirdURL); …Run Code Online (Sandbox Code Playgroud) Facebook页面是我们学习某些东西的有用渠道.但我在按日期过滤帖子时遇到问题:按指定日期获取所有帖子.旧职位浮动.
是否有任何Facebook API支持执行此任务?
我是这个Facebook编码游戏的新手,所以偶然发现了我认为只有我可能会遇到的错误.我最初想要允许用户登录来管理他们的页面,但是作为一个想法,客户希望他们的用户也能够发布到他们各自的页面.
所以,我在范围内添加了publish_stream权限,但我只是因为Facebook出错而陷入困境.
我是否必须先从应用程序中取消激活自己的文档:
https://developers.facebook.com/docs/authentication/
附上代码,任何帮助都会很棒:
$facebook = new Facebook(array(
'appId' => $this->app_id,
'secret' => $this->secret,
));
$s = setting::findAppSettingSpecific('social','facebook');
// exit;
$facebook->setAccessToken($s);
$user = $facebook->getUser();
$dia_url = 'http://localhost/social/accept/';
$login_url = $facebook->getLoginUrl($params = array('redirect_uri' => $dia_url,'scope' => 'manage_pages,publish_stream'));
if($user == 0) {
}
else
{
echo ("<script> top.location.href='".$login_url."'</script>");
echo 'Facebook Loves Us';
return true;
}
Run Code Online (Sandbox Code Playgroud)
它正在使用Localhost,以防有人指出这一点,但是在添加额外权限时才开始调用错误.
提前致谢.
My main page is index.php. Here I perform user login and then redirected to url.php using ajax request. Now user may move to various pages.
I need current user facebook id on those pages. How can I get it?
login.php
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId: '<?php
echo $appId;
?>',
cookie: true,
xfbml: true,
// channelUrl: '<?php
echo $return_url;
?>channel.php',
oauth: true}
);
};
(function() {
//alert("1");
var e = document.createElement('script');
e.async = true;
e.src = document.location.protocol …Run Code Online (Sandbox Code Playgroud) ajax facebook session-variables facebook-javascript-sdk facebook-php-sdk