应用程序是否可以在Facebook时间轴中的特定日期(过去)插入事件?
facebook facebook-graph-api facebook-timeline facebook-opengraph
Facebook今天(2月29日)发布了Pages的时间表.它提供粉丝和组织之间的私人消息.
您是否听说过API或黑客能够访问这些消息?
我正在为iPhone制作音乐播放器,我希望用户能够将歌曲发布到他们的时间轴上.我有Facebook Connect工作,我已经注册了Open Graph对象和Facebook的动作,但我无法弄清楚如何从iOS创建/发布对象和动作.
Facebook给了我以下代码,但我不知道在哪里使用它的iOS SDK.
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# MYAPPNAME: http://ogp.me/ns/fb/MYAPPNAME#">
<meta property="fb:app_id" content="xxxxxxxxxxxxxxx" />
<meta property="og:type" content="MYAPPNAME:song" />
<meta property="og:url" content="Put Your Own URL Here" />
<meta property="og:title" content="Some Arbitrary String" />
<meta property="og:description" content="Some Arbitrary String" />
<meta property="og:image" content="http://ogp.me/logo.png" />
Run Code Online (Sandbox Code Playgroud) 我正在为具有"时间轴"布局的Facebook页面开发应用程序,我希望应用程序的高度随内容缩放,但应用程序的高度固定为800px.
当前的应用程序设置显示高度设置为"流体",但我也尝试将高度固定为随机值,并且目睹没有变化.
如何让我的应用程序的高度扩展到它的内容?感谢您的回复.
更新:所以附加到我的身体标签工作.
<body onload="FB.Canvas.setSize({width: 810, height: 910})">
<div id="fb-root"></div>
<script>
(function () {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js#xfbml=1&appId=YOURAPPID;
e.async = true;
document.getElementById('fb-root').appendChild(e);
} ());
</script>
Run Code Online (Sandbox Code Playgroud)
但我不知道为什么它有效,所以我想我会把我的问题改为'上面的代码是做什么的?' 所以我真的可以理解下次要采取的步骤.我现在把它作为答案来解决这个问题.
我刚刚阅读了一篇文章并了解了基于JVM for Java构建的HHVM.我继续尝试在网上搜索,但发现只有关于在Ubuntu build 12版本上安装它的文章.
我一直在使用WAMP堆栈,想知道我是否可以将HHVM用于我的任何应用程序.另外,我想了解HHVM是否可以与我们现有的应用程序集成.之前有一篇文章建议HipHop是FB为了根据他们的要求提高他们的表现所写的,它可能不适合你的.与HHVM是一样的吗?
在Rails 3中,如果我想点击db,我会在查询结束时使用.all.这对于我在写入时刷新缓存(因此读取总是命中缓存)这一点非常有用.
现在在Rails 4中,Model.all返回一个ActiveRecord::Relation对象(即没有命中db).让它真正进入数据库并返回指定记录的最佳方法是什么?
最近我一直在将ARIA实现到Web应用程序中,我发现这个问题在改进导航部分方面非常有用.
在所有模块中实现此功能后,我发现了此HTML验证错误:
此时
aria-selected元素a上不允许属性.
看看ARIA规范,我看到它aria-selected仅用于角色gridcell,选项,行和制表符.就我而言,链接的作用是menuitem.
这是HTML代码的代表性示例:
<nav role=navigation>
<ul role=menubar>
<li role=presentation><a href='page1.php' role=menuitem>Page 1</a></li>
<li role=presentation><a href='page2.php' role=menuitem>Page 2</a></li>
<li role=presentation><a href='page3.php' role=menuitem aria-selected=true>Page 3</a></li>
<li role=presentation><a href='page4.php' role=menuitem>Page 4</a></li>
</ul>
</nav>
Run Code Online (Sandbox Code Playgroud)
如您所见,这是在"第3页"上进行的.
在这里使用的ARIA角色是什么?
我已经看过这两个问题了:
但是它们都使用聚合函数MAX来获得最高值或填充值,这对我的情况不起作用.
出于这个问题的目的,我简化了我的情况.这是我目前的数据:

我想获得每条路线的运营商名称,但是关于旅行方向(即订购或"偏好"值).这是我的伪代码:
if(`direction` = 'west' AND `operatorName` != '') then select `operatorName`
else if(`direction` = 'north' AND `operatorName` != '') then select `operatorName`
else if(`direction` = 'south' AND `operatorName` != '') then select `operatorName`
else if(`direction` = 'east' AND `operatorName` != '') then select `operatorName`
Run Code Online (Sandbox Code Playgroud)
我当前的SQL查询是:
SELECT route, operatorName
FROM test
GROUP BY route
Run Code Online (Sandbox Code Playgroud)
这给了我分组,但我的目的是错误的运算符:
route | operatorName
--------------------
95 | James
96 | Mark
97 | Justin
Run Code Online (Sandbox Code Playgroud)
我尝试过应用一个ORDER BY条款但GROUP BY …
我需要替换键:值对周围的方括号,类似于以下内容.任何帮助深表感谢!
'properties'中的数据如下所示:
name: property1
value: [12345667:97764458]
**code**
SELECT p.name, regexp_replace(p.value,'[','') AS value
FROM properties p
Run Code Online (Sandbox Code Playgroud)
解决:修改后的代码
SELECT p.name, regexp_replace(p.value,'\\[|\\]','') AS value
FROM properties p;
Run Code Online (Sandbox Code Playgroud) 我的应用程序中的大多数响应要么是视图,要么是 JSON。我不知道如何将它们放入ResponseInterface在PSR-7中实现的对象中。
这是我目前所做的:
// Views
header('Content-Type: text/html; charset=utf-8');
header('Content-Language: en-CA');
echo $twig->render('foo.html.twig', array(
'param' => 'value'
/* ... */
));
// JSON
header('Content-Type: application/json; charset=utf-8');
echo json_encode($foo);
Run Code Online (Sandbox Code Playgroud)
这是我试图用 PSR-7 做的事情:
// Views
$response = new Http\Response(200, array(
'Content-Type' => 'text/html; charset=utf-8',
'Content-Language' => 'en-CA'
));
// what to do here to put the Twig output in the response??
foreach ($response->getHeaders() as $k => $values) {
foreach ($values as $v) {
header(sprintf('%s: %s', $k, $v), false);
} …Run Code Online (Sandbox Code Playgroud)