在Raspberry Pi上添加时间?(Adding Time on Raspberry Pi?)
我正在我的Raspberry Pi上运行一个应用程序,它在shell脚本中包含以下行,
sleep 1800
然后我发现Raspberry Pi没有办法保留时间。 如何添加驱动程序和/或应用程序来获取时间?
I'm running an application on my Raspberry Pi, which includes the following line in a shell script,
sleep 1800
It then occurred to me that the Raspberry Pi does not have a way to keep time. How can I go about adding a driver and/or an application to get time?
原文:https://stackoverflow.com/questions/14349892
最满意答案
来自https://developers.facebook.com/docs/sharing/best-practices#learn
“ 某些插件还有一个参数,可用于跟踪您网站上的流量生成。 如果朋友点击了某人喜欢您的某个网页的故事,我们会将ref参数传递回您的网站,您可以使用自己的分析软件跟踪该网站。 有关详细信息,请参阅社交插件的参数。“
我突出显示 - AFAIK在文档中没有说明,您可以在通过API发布帖子时将其设置为API参数。
为了确保,我尝试使用ref参数集发布一些Feed故事,但这些故事并没有出现在洞察中。
您的意思是,您在调用中添加了
ref
作为附加API参数来发布帖子 - 或者您是否将其附加到您直接发布的URL? 后者可能或可能不起作用,这取决于og:url
值是否也包含参数。 (但请注意,如果您在og:url
包含不同的rev
参数值,Facebook会将它们视为不同的URL / Open Graph对象 - 因此喜欢,分享等将在它们之间进行分割 ,并为每个对象分别计算。这是一个“通缉”或至少是可接受的副作用,由你来决定。无论如何,不能保证这根本不会起作用。)From https://developers.facebook.com/docs/sharing/best-practices#learn
“Some plugins also have a
ref
parameter which can be used to track traffic generation on your site. If a friend clicks on a story about someone liking one of your pages, we'll pass the ref parameter back to your site, where you can track it with your own analytics software. See the parameters for social plugins for more info.”Highlight by me – AFAIK it doesn’t say anywhere in the docs, that you could set this as an API parameter yourself when making posts via API.
Just to make sure, I tried publishing some feed stories with the ref parameter set, but those did not show up in insights.
You mean, you added
ref
as an additional API parameter in your call that makes the post – or did you append it to the URL that you are posting directly? The latter might or might not work, depending of whether theog:url
value contains the parameter as well. (But be aware that if you include differentrev
parameter values into theog:url
, Facebook will treat them as different URLs/Open Graph objects – so likes, shares etc. will be split between them, counted individually for each of them. Whether that’s a “wanted” or at least acceptable side-effect, is for you to decide. And anyway, no guarantee this’ll work at all.)
相关问答
更多-
何时使用ref vs out(When to use in vs ref vs out)[2022-03-11]
你应该使用out除非你需要ref 。 当需要将数据编组到另一个进程,这可能是昂贵的,这是一个很大的区别。 所以你想避免在方法没有使用它时编组初始值。 除此之外,它还向宣读者或调用者显示初始值是否相关(并可能保留)或被丢弃。 作为一个小的区别,out参数不需要初始化。 示例: string a, b; person.GetBothNames(out a, out b); 其中GetBothNames是一种以原子方式检索两个值的方法,该方法不会改变任何a和b的行为。 如果呼叫转移到夏威夷的服务器,将初始值从这 ... -
除了按照您的注意返回元组之外,您还可以将带有变量的类的实例传递给方法,然后在这些类上设置属性或调用方法以在方法中设置变量值。 private void SetPlayers(..., MyClass myInstance) { .... myInstance.Check = true; .... } 或者,也可以使用get和set属性定义一个类或结构来保存返回的数据,然后从您的方法返回该类的实例。 class SetPlayerData { public bool Check {get ...
-
来自https://developers.facebook.com/docs/sharing/best-practices#learn “ 某些插件还有一个参数,可用于跟踪您网站上的流量生成。 如果朋友点击了某人喜欢您的某个网页的故事,我们会将ref参数传递回您的网站,您可以使用自己的分析软件跟踪该网站。 有关详细信息,请参阅社交插件的参数。“ 我突出显示 - AFAIK在文档中没有说明,您可以在通过API发布帖子时将其设置为API参数。 为了确保,我尝试使用ref参数集发布一些Feed故事,但这些故事并没 ...
-
它是出现在用户时间轴上的“最近使用的应用程序”单元(附带示例) 顺便说一下,这不是您链接的官方文档,而是第三方网站 it's the 'Recently used Apps' unit which appears on a user's Timeline (example attached) By the way, that's not official documentation you linked to, it's a third-party site
-
干得好: // we need to get an application access_token first $token_url = "https://graph.facebook.com/oauth/access_token?" . "client_id=" . $app_id . "&client_secret=" . $app_secret . "&grant_type=client_credentials"; $app_token = file_get_contents($t ...
-
好像我找到了解决方案。 如果您没有传递描述,但是传递一个标题参数,它就可以工作。 然后出现名称,下面的标题文本以及下面的解析链接文本 Seems I've found the solution. It works if you do not pass a description, but pass a caption argument instead. Then the name appears, the caption text below, and the parsed link text below ...
-
获取帖子洞察(API)(Get post insights (API))[2023-01-02]
您可以使用此调用检索帖子信息: https://graph.facebook.com/PAGE_ID/posts Facebook在2011年10月添加了这个: https : //developers.facebook.com/blog/post/573/ You can retrieve post information using this call: https://graph.facebook.com/PAGE_ID/posts Facebook added this in Oct '11: ... -
回答 我使用此代码获取最近的对象: [{'value'=1}] 然后我使用基本的JS调用删除所有字符什么不是[0-9] function reachText() { $('.reach').each(function(){ reach = $(this).text().replace(/[^0-9]/g, ''); $(this).text(reach); }); ...
-
您确定用户B的隐私设置允许对其上的帖子进行评论和喜欢吗? 如果您是,请澄清您发布的内容,如果相同的内容发布到您自己的墙上,您是否可以喜欢/评论? Are you sure that user B's privacy settings allow comments and likes to be made on Posts which are on their wall? If you are, please clarify what you're posting, are you able to like/ ...
-
为什么它总是为我的应用显示“No Insights Available”?(Why does it always display “No Insights Available” for my apps?)[2022-04-19]
最后,事实证明这是他们现在修复的Facebook漏洞。 我们没有做错任何事。 事实上,一个应用程序具有画布页面视图而另一个不具有纯粹的巧合。 周三,Facebook已经部署了一个更新版本的Insights,它直接与他们的应用程序页面集成 - 奇迹般地,我们能够再次看到所有应用程序的Insights数据,包括Facebook之前列为“没有洞察力的历史数据”。 “ 如果有人有兴趣,这里是他们在升级的Insights应用程序上发布的博客。 https://developers.facebook.com/blog/ ...