我的网站使用Facebook Page API从页面所有者发布的Facebook页面中提取公共内容,以创建一个动态博客,其中包含指向Facebook页面的清晰链接.
你可以在这里看到它:https://kc-hrubeho.cz(ctrl + F"Facebook").黄色按钮"Načístdalší"作为AJAX分页.很抱歉捷克语,这个网站没有英文版本.
我正在使用此URL来获取页面内容的JSON对象: https://graph.facebook.com/<PAGE-ID>/feed?access_token=<TOKEN>&limit=10&fields=message,link,attachments,created_time,full_picture,picture,timeline_visibility
现在它可以工作,但App评论FAQ说明:
我的应用程序用于访问页面上的公共内容,我是否受到v3.0更改的影响?
是.访问公共页面内容的应用程序需要请求页面公共内容访问功能,并且需要通过Facebook进行审核.
此外,还有这个通知:
为了维护您当前的API访问权限,您的应用需要在2018年8月1日之前提交审核.
我已填写表格以供审核.其中一个必需项目是"截屏视频".
我们需要使用Page Public Content Access查看您的应用,以便我们可以看到它不违反我们的政策.使用任何方法上传视频截屏演练(甚至使用手机录制).你必须表明:
- 一个人如何使用Facebook登录
- 一个人如何看待您的应用中使用的此功能
然而,有关截屏视频的详细说明如下:
如果您的应用仅由您或少数人使用,则无需提交.App Dashboard中"角色"选项卡中列出的任何帐户(如管理员,开发人员和测试人员)都可以访问所有权限并生成用户或页面访问令牌.
您可以使用这些帐户中的任何一个来测试您的应用并创建截屏视频.
这令人难以置信的混乱.我的问题是:
如果我的代码访问Pages API并在我的网站上显示结果,它是否"由减少人数使用"?
如果我不需要创建截屏视频,我该如何申请评论?我是否甚至需要它(意思是"我的代币将在8月1日之后工作")?
如果我确实需要使用截屏视频进行评论,我应该在我的案例中记录什么?我应该将我的代码和网站的一些截屏视频拼接到一个视频吗?那个,imho,听起来只是疯子.:)
如果我只需要读取我自己页面的数据,是否会有一个不同的端点(不需要审查或截屏)我应该使用它?
我的旧应用程序现在正在运行(不确定8月1日,见上文).对于具有相同用途的应用程序(只读取由应用程序的所有者所拥有的FB的公共内容)创建后,所有的评论做文章,将有相同rulset的是旧的?
提前致谢!
这是我从官方FB支持小组Facebook开发者社区的小组主持人那里听到的:
您可以在开发模式下使用应用程序来检索您管理的网页的Feed.[...]我不知道8月1日是否会改变当前的行为,或者当前的行为是否是预期的行为.[...]事实上,我从来没有见过一个人,这是能够预测会发生什么事在90天以上......大多数专家甚至无法预测明天的天气;)说真的,我不知道...
非常令人沮丧,但到目前为止我得到的最具体的答案.
我终于在我的工作流程中加入了GitHub和Composer依赖管理.这绝对是一个巨大的进步,虽然我仍然对GIT管理"嵌套"家属感到困惑.
当我使用一个很棒的Wordpress Stack ROOTS/BEDROCK时,我的简化目录结构如下所示:
|-- /project
| |-- /.git // git repository for the skeleton/stack of the project
| |-- composer.json // list of dependencies, most of them are my own repositories on GitHub
| |-- /vendor
| | |-- /php-dependency-1 // 3rd party dependencies not directly related to Wordpress
| |-- /web
| | |-- /app // acts as "wp-admin" folder
| | | |-- /mu-plugins
| | | | |-- /SUBREPOSITORY-1 // my own …Run Code Online (Sandbox Code Playgroud) 如果元素position: sticky"卡住"并且比视口长,则只能在滚动到容器底部后才能看到其内容.
如果"卡住"元素与文档一起滚动并且一旦到达其底部边缘就停止,那将会很酷.如果用户向后滚动,同样的事情会再次发生,但相反.
TLDR; 有一个库(StickyKit)可以完成我正在寻找的东西,但是在新的异步滚动中表现不佳.
JSFiddle with StickyKit - https://jsfiddle.net/cibulka/4nd3b0tt/ - (这就是我所描述的,但表现不佳,见下文)
JSFiddle与原生 position: sticky - https://jsfiddle.net/cibulka/np6afe9c/1/ - https://jsfiddle.net/cibulka/pxz6e0qv/ - (这不)
很长一段时间,我是StickyKit的快乐用户.不幸的是,它在异步滚动方面效果不佳,越来越多的浏览器使用异步滚动来提高性能.例如,使用新的Firefox Quantum(57),StickyKit几乎无法使用.
我在StickyKit Github中创建了一个问题,但作者似乎放弃了包:https://github.com/leafo/sticky-kit/issues/252
因此,我不得不弃用StickyKit并转向原生position:sticky(使用StickyFill进行polyfilled).不幸的是,有一些事情position:sticky是做不到的,这就是其中之一.
我还有另一个问题position:sticky:位置粘滞:叠加
一个建议,基本上,如何处理这个问题.我想使用不同的JS/jQuery库,编写自己的代码或使用一些古怪的CSS hack来破解position:sticky功能.
简而言之:我每次执行没有'sudo'的任何Vagrant命令时都会遇到权限错误 - 从.vagrant up到vagrant provision.这是预期的行为吗?
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:295:in `unlink': Permission denied - /Users/Cibulka/Sites/.vagrant/machines/default/virtualbox/id (Errno::EACCES)
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:295:in `delete'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:295:in `id='
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:438:in `state'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/providers/virtualbox/action/created.rb:11:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/call.rb:43:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:196:in `action_raw' …Run Code Online (Sandbox Code Playgroud) 是否有一些简单的方法如何在提供默认值的同时在 Ruby 中请求用户输入?
考虑 bash 中的这段代码:
function ask_q {
local PROMPT="$1"
local DEF_V="$2"
read -e -p "$PROMPT" -i "$DEF_V" REPLY
echo $REPLY
}
TEST=$(ask_q "Are you hungry?" "Yes")
echo "Answer was \"$TEST\"."
Run Code Online (Sandbox Code Playgroud)
你能用 Ruby 实现类似的行为gets.chomp吗?
function ask_q(prompt, default="")
puts prompt
reply = gets.chomp() # ???
return reply
def
reply = ask_q("Are you hungry?", "Yes")
Run Code Online (Sandbox Code Playgroud)
我知道我可以通过这种方式对 Ruby 中的功能进行排序复制......
def ask_q(prompt, default="")
default_msg = (default.to_s.empty?) ? "" : "[default: \"#{default}\"]"
puts "${prompt} ${default}"
reply = gets.chomp()
reply = (default.to_s.empty?) ? …Run Code Online (Sandbox Code Playgroud) 到文件jungle.txt与以下文本...
A lion sleeps in the jungle
A lion sleeps tonight
A tiger awakens in the swamp
The parrot observes
Wimoweh, wimoweh, wimoweh, wimoweh
Run Code Online (Sandbox Code Playgroud)
......可以进行GREP搜索......
$ grep lion jungle.txt
Run Code Online (Sandbox Code Playgroud)
...或SED搜索...
$ sed "/lion/p" jungle.txt
Run Code Online (Sandbox Code Playgroud)
...找到模式的出现(在这种情况下为"狮子").
是否有一些简单的方法来获得一些返回的线?或者至少知道发现了超过1个?和往常一样,我先搜索了很多,但令人惊讶的是没有找到答案.
谢谢!
bash ×2
chown ×1
composer-php ×1
css ×1
facebook ×1
gets ×1
git ×1
git-subtree ×1
grep ×1
javascript ×1
macos ×1
nested ×1
permissions ×1
regex ×1
ruby ×1
sed ×1
sticky ×1
sudo ×1
vagrant ×1