我正在使用FB.getLoginStatusFacebook的应用程序.这适用于所有浏览器,包括IE8.但它不适用于IE7.我的代码是:
FB.getLoginStatus(function(response) {
if (response.session) {
alert("logout");
}
else{
FB.Event.subscribe('auth.login', function(response) {
login();
});
alert("login");
}
});
Run Code Online (Sandbox Code Playgroud)
有谁知道为什么?
我在Tumblr博客上添加了一个Facebook Like按钮(在模板中):iFrame代码和Open Graph标签.该按钮通常显示在每篇博客文章下方.当我单击按钮时,它会将其状态更改为"已喜欢",但会在一秒后翻转回原始状态.
博客文章的HTML源代码是(iframe部分):
<iframe class="fb_button" src="http://www.facebook.com/plugins/like.php?app_id=APP_ID&href=http://www.beyondbrands.nl/post/7354959316/startup-weekend-amsterdam-join-crowdriding&send=false&layout=button_count&width=90&show_faces=true&action=like&colorscheme=light" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe>
Run Code Online (Sandbox Code Playgroud)
OG标签:
<meta property="og:title" content="Beyond Brands Blog, StartUp Weekend Amsterdam about to get started" />
<meta property="og:type" content="article" />
<meta property="og:url" content="http://www.beyondbrands.nl/post/7354959316/startup-weekend-amsterdam-join-crowdriding" />
<meta property="og:image" content="http://26.media.tumblr.com/avatar_6e2d27950ebb_128.png" />
<meta property="og:site_name" content="Beyond Brands Blog" />
<meta property="fb:admins" content="598414663" />
Run Code Online (Sandbox Code Playgroud) 我正在尝试运行我从http://thinkdiff.net/facebook/php-sdk-3-0-graph-api-base-facebook-connect-tutorial/下载的Facebook连接示例代码
我收到此错误信息 :
[error] => Array
(
[message] => An active access token must be used to query information about the current user.
[type] => OAuthException
[code] => 2500
)
Run Code Online (Sandbox Code Playgroud)
你可以试试我的网站:http://facebook.oliverjordan.net/thinkdiff
这是fbmain.php代码:
<?php
//facebook application
$fbconfig['appid' ] = "463007877113xxx";
$fbconfig['secret'] = "-sensor-";
$fbconfig['baseurl'] = "http://facebook.oliverjordan.net/thinkdiff/index.php"; //"http://thinkdiff.net/demo/newfbconnect1/php/sdk3/index.php";
//
if (isset($_GET['request_ids'])){
//user comes from invitation
//track them if you need
}
$user = null; //facebook user uid
try{
include_once "facebook.php";
}
catch(Exception $o){
error_log($o);
} …Run Code Online (Sandbox Code Playgroud) facebook oauth facebook-oauth facebook-php-sdk facebook-access-token
我有这个功能我必须实现:
protected override ValidationResult IsValid(
Object value,
ValidationContext validationContext
)
{
//Here is where I wanna test whether the following conversion is applicable
var x = Convert.ToInt64(value);
}
Run Code Online (Sandbox Code Playgroud)
我可以将该行包装在 try-catch 块中,或者使用其他方法来执行该测试,以下是其中之一:
var convertible = value as IConvertible;
if (convertible != null)
var x = convertible.ToInt64(null);
Run Code Online (Sandbox Code Playgroud)
执行此操作的最有效方法是什么?
我正在尝试使用javascript创建facebook连接,这会产生以下错误:
应用程序配置不允许使用URL:应用程序的设置不允许使用一个或多个给定的URL.它必须与网站URL或Canvas URL匹配,或者域必须是App域之一的子域.
是否是由于我使用Localhost服务器进行测试?我是否需要购买域名来测试这个或什么?或者我需要在以下代码中进行更改:
我的代码:
<?php
//
// uses the PHP SDK. Download from https://github.com/facebook/php-sdk
include("facebook-php-sdk/src/facebook.php");
//
// from the facebook app page
define('YOUR_APP_ID', '321849981247524');
define('YOUR_APP_SECRET', '49fd00ce6237aff0af08fd8ca25dbc92');
//
// new facebook object to interact with facebook
$facebook = new Facebook(array(
'appId' => YOUR_APP_ID,
'secret' => YOUR_APP_SECRET,
));
//
// if user is logged in on facebook and already gave permissions
// to your app, get his data:
$userId = $facebook->getUser();
?>
<html>
<head>
<style>body { text-align:center; font-size: 40px }</style>
</head> …Run Code Online (Sandbox Code Playgroud) 我试着开始gvim使用这样的start命令
start gvim.exe
Run Code Online (Sandbox Code Playgroud)
但它不起作用gvim,尽管它确实有用firefox.exe.我的问题是 -
如何gvim从命令提示符开始?
为什么start命令不起作用gvim.exe?
从命令提示符启动gvim时是否可以使用任何其他参数?
我在Facebook开发者网站https://developers.facebook.com/docs/tutorials/ios-sdk-games/requests/上关注这两个教程
https://developers.facebook.com/docs/howtos/send-requests-using-ios-sdk/#step2
这些是我的代码:
[FBWebDialogs presentRequestsDialogModallyWithSession:nil
message:[NSString stringWithFormat:@"I just smashed %u friends! Can you beat it?", score]
title: nil
parameters:params
handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error)
{
if (error)
{
// Case A: Error launching the dialog or sending request.
UIAlertView* alert = [[UIAlertView alloc] initWithTitle: @"Facebook" message: error.description delegate: nil cancelButtonTitle: @"Ok" otherButtonTitles: nil];
[alert show];
[alert release];
}
else
{
if (result == (FBWebDialogResultDialogCompleted))
{
// Handle the publish feed callback
NSDictionary *urlParams = [self parseURLParams:[resultURL query]]; …Run Code Online (Sandbox Code Playgroud) 我想触发fb:login-button:
<fb:login-button show-faces="true" width="200" max-rows="1"></fb:login-button>
Run Code Online (Sandbox Code Playgroud)
带有第二个按钮。为什么?我无法调整 Facebook 的 css,我想要一个带有自定义图像的精美按钮来替换它。我的大问题是我不知道 FB 按钮的 ID 是什么,而且我不能给它一个。
我的错误代码:
<script>
function Ffirst()
{
alert("first");
$("fb:login-button").click();
//$("fb:login-button").trigger("click"); //doesn't work eiter
}
</script>
<input type="submit" onclick="Ffirst()" name="savebutton" id="first" />
<fb:login-button show-faces="true" width="200" max-rows="1"></fb:login-button>
Run Code Online (Sandbox Code Playgroud)
FTR:
这就是我按下时发生的情况the fb:login-button
FB.Event.subscribe('auth.authResponseChange', function(response) {
// Here we specify what we do with the response anytime this event occurs.
if (response.status === 'connected') {
testAPI();
}
} else if (response.status === 'not_authorized') {
FB.login();
} else {
FB.login();
}
}); …Run Code Online (Sandbox Code Playgroud)