我正在使用facebook开放图,新api,我可以这样做:
<fb:login-button show-faces="true" max-rows="9" perms="email" autologoutlink="true" onlogin="window.location = 'http://www.example.com/facebook/facebook_test/'"></fb:login-button>
Run Code Online (Sandbox Code Playgroud)
但当我在http://developers.facebook.com/docs/reference/javascript/FB.login中需要更多选项时,如果我阅读了doc,我说:
FB.login(function(response) {
if (response.session) {
if (response.perms) {
// user is logged in and granted some permissions.
// perms is a comma separated list of granted permissions
} else {
// user is logged in, but did not grant any permissions
}
} else {
// user is not logged in
}
}, {perms:'read_stream,publish_stream,offline_access'});
Run Code Online (Sandbox Code Playgroud)
但如果我需要另一个图像为fb按钮,如果我需要另一个东西,我找不到怎么做,在html的哪个部分我可以调用FB.login,是在标签'脚本'之间?
我们目前正在测试桌面应用程序的Facebook功能.我们定义了一个Facebook应用程序,然后创建了开放图形操作,对象和聚合.
第一个问题:如果获取的(对象URL)和规范(og:url)URL不同,为什么标签是从规范URL而不是从提取的URL中获取的?首先有一个提取和规范的URL有什么用?
第二个问题:当一个动作被发布并且用户跟随Facebook聚合框中的相应链接时,我们看到其他参数在查询字符串中与我们的og:url组合在一起(例如?fb_action_ids = ##&fb_action_types = ...&fb_source = recent_activity).有没有办法让我们的og:url保存,而不是以这种方式扩展?
我有我的页面的HTML结构,如下所示.我添加了所有元标记,但仍然无法从我的网站上抓取任何信息.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html;" charset=utf-8"></meta>
<title>My Site</title>
<meta content="This is my title" property="og:title">
<meta content="This is my description" property="og:description">
<meta content="http://ia.media-imdb.com/images/rock.jpg" property="og:image">
<meta content="<MYPAGEID>" property="fb:page_id">
.......
</head>
<body>
.....
Run Code Online (Sandbox Code Playgroud)
当我在facebook调试器(https://developers.facebook.com/tools/debug)中输入URL时,我收到以下消息:
Scrape Information
Response Code 404
Critical Errors That Must Be Fixed
Bad Response Code URL returned a bad HTTP response code.
Errors that must be fixed
Missing Required Property The 'og:url' property is required, but not present.
Missing …Run Code Online (Sandbox Code Playgroud) 我的网站目前正在使用HTTPS://运行.我正在利用这个加入社交功能.
问题:我面临关于linkedin共享的以下问题.
a)大部分时间只有一半的图像出现b)有些时候图像没有出现.
问题:
1)我可以将og:image:secure_url和og:图像放在页面上,用于linkedin和facebook.如果是,那该订单应该是什么.例:
<meta property="og:image" content="http://example.com/ogp.jpg" />
<meta property="og:image:secure_url" content="https://secure.example.com/ogp.jpg" />
Run Code Online (Sandbox Code Playgroud)
2)链接和Facebook正确显示图像必须遵循以下规定.
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="400" />
<meta property="og:image:height" content="300" />
Run Code Online (Sandbox Code Playgroud)
任何解决方案,但它应该适用于linkedin和Facebook.
我遇到了Facebook的问题OpenGraph以及DateTime我在我的页面上设置的属性.
标签看起来像这样:
<meta content="2013-06-10" property="app:departing_on" />
Run Code Online (Sandbox Code Playgroud)
标签DateTime在OpenGraph类型上正确设置.我用它来创造一个新的故事.当我模拟一个帖子时,它会改变时区以匹配我的(UTC-3),所以我得到2013年6月9日晚上9点.这是一个仅限日期的活动,所以我实际上没有时间展示,只是一个约会.
我可以强迫Facebook将其解析为约会吗?
以前有关于此的帖子在网络上,但是所提出的解决方案都没有实际适用于我的场景.
我有一个子页面,它们都有自己独特的og标签,以及一个带有自己的og标签的父根域页面,所有这些都可以被Facebook抓取,这样人们就可以在发布时看到描述/图像.
但是,当我在框中发布我的孩子网址时,结果明显证明facebook已经抓取了父网页.甚至"看到我们的刮板看到的确切"页面也确认了这一点,因为它只显示了父模板.
这是fb's scrapper的链接:https://developers.facebook.com/tools/debug
以下是根域html模板中的og标记:假设父文件是www.me.com假设有一个孩子是www.me.com/path/path
<head> ...
<meta name="keywords" content="...">
<meta name="description" content="..." />
<meta property="fb:app_id" content="..."/>
<meta property="og:site_name" content="..." />
<meta property="og:type" content="website" />
<meta property="og:title" content="..." />
<meta property="og:image" content="..." />
<meta property="og:description" content="..." />
<meta property="og:url" content="http://www.me.com" />
Run Code Online (Sandbox Code Playgroud)
以下是子html模板中的og标记:
<head> ...
<meta name="keywords" content="...">
<meta name="description" content="..." />
<meta property="fb:app_id" content="..."/>
<meta property="og:site_name" content="..." />
<meta property="og:type" content="article" />
<meta property="og:title" content="..." />
<meta property="og:image" content="..." />
<meta property="og:description" content="..." />
<meta property="og:url" …Run Code Online (Sandbox Code Playgroud) 我不喜欢文档头部的标签数量.这是一些元标记的示例.
<!--w3c-->
<title>Page Title</title>
<meta name="description" content="great description">
<!--schema.org-->
<meta itemprop="name" content="Page Title">
<meta itemprop="description" content="great description">
<!-- opengraph-->
<meta property="og:title" content="Page Title">
<meta property="og:description" content="great description">
Run Code Online (Sandbox Code Playgroud)
是否可以组合标签/属性来减少代码大小而不影响SEO?
例如,
<title itemprop="name">Page Title</title>
itemprop属性可以在任何地方使用,所以我很确定这很好,但据我所知,property ="og:*"属性必须与元标记一起使用.
那么以下标记是否可以接受?
<meta name="description" itemprop="description" property="og:description" content="great description">
Run Code Online (Sandbox Code Playgroud)
这将如何影响SEO?
非常感谢
我老老实实地花了几个小时试图让它发挥作用.不幸的是,Facebook和App Link的文档还不够清晰.甚至来自F8的App Links视频.
应用要求:
迄今取得的进展:
我正在使用以下代码来创建托管的应用程序链接(因为我只有移动内容),根据FB开发人员的网站在发布iOS SDK下.
NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
@"{My app name}", @"name",
{custom URL}, @"al:iphone:url",
@"{app store ID}", @"al:iphone:app_store_id",
@"{My app name}", @"al:iphone:app_name",
@"{\"should_fallback\": false}", @"web",
fbAccessToken, @"access_token",
nil
];
/* make the API call */
[FBRequestConnection startWithGraphPath:@"/{FB app id}/app_link_hosts"
parameters:params
HTTPMethod:@"POST"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {
/* handle the result */
NSLog(@"Result = %@",result);
if(error) NSLog(@"error = %@",error); …Run Code Online (Sandbox Code Playgroud) 我正在创建一个博客,其中着陆页默认显示5个最新帖子,每个帖子上都会有Facebook和Twitter分享按钮.
我需要每个共享按钮都有一个默认的标题,描述和图像附加到他们,我正在使用开放图形来附加数据.
问题是如何为每个共享按钮包含多个打开的图形数据.我听说有一种方法使用iframe,另一种方法是传递共享URL中的数据.
我正在尝试发布一个链接到LinkedIn.键入/粘贴链接后,将显示预览.此预览应该从Open Graph标记中绘制缩略图图像,标题,描述和URL等属性.如果它找不到这样的标签,它会使用页面的其余部分来计算出来.
它说要使用以下标签:
<meta property='og:title' content='Title of the article"/>
<meta property='og:image' content='//media.example.com/ 1234567.jpg"/>
<meta property='og:description' content='Description that will show in the preview"/>
<meta property='og:url' content='//www.example.com/URL of the article" />
Run Code Online (Sandbox Code Playgroud)
我已经做到了这一点,虽然Facebook能够看到我指定的所有数据,但LinkedIn在某种程度上遇到了麻烦.
我尝试了所有的技巧:
prefix="go: http://ogp.me/ns#"元标记由于与Facebook不同,你不能强制清除并重新抓取缓存,我实际上无法检查LinkedIn在页面上看到了什么.链接预览中显示的数据清楚地取自没有Open Graph标签时(它使用页面中的第一个图像作为缩略图,没有描述,并且它使用"Home"作为标题 - 这不是标题这页纸).所以要么没有什么能够清除这个缓存,要么忽略了我的标签.
尽管尝试了上述所有修复程序,有没有人对这项工作有任何好运,而不必等待7天缓存清除?
opengraph ×10
facebook ×6
linkedin ×2
applinks ×1
codeigniter ×1
html ×1
ios ×1
javascript ×1
meta ×1
schema.org ×1
seo ×1
share ×1
twitter ×1
url ×1