草庐IT

facebook_access_token

全部标签

php - Facebook Graph API - v2.1 及更高版本不推荐使用 fql

我知道在stackoverflow上会有类似的问题,但在我的情况下似乎不起作用。这是我的代码:publicfunctionfetchFriendDetails($accessToken,$userId){//echo$accessToken;exit;$curlUrl='https://graph.facebook.com/fql?access_token='.$accessToken.'&pretty=0&q={'.urlencode('"v_1":"selectuid,name,birthday_date,username,current_locationfromuserwhere

php - Laravel Blade : Getting access to a variable in a nested partial from a parent view

我的父View是这样的:show.blade.php@include('inquiries.partials.inquiries')它使用以下部分:查询.blade.php@foreach($inquiryas$key=>$item)@include('inquiries.partials.inquiry')@endforeach其中使用了另一个部分:查询.blade.php...@yield('inquiry.toolbar','')在show.blade.php中,我想为inquiry.blade.php定义inquiry.toolbar部分,但是我需要访问inquiries.bl

php - 是否有可能在 PHP 中使用 file_get_contents 破坏 CSRF token 验证

在每个session的表单上使用token的CSRF预防方法是一种流行的方法。但是,如果PHP的file_get_contents可以获取跨域文件表单的内容,我不明白这种token方式如何保护-->它可以获取表单上的token并使用它。那么这种token方式是如何工作的呢? 最佳答案 如果我很好地理解你的问题,你正在想象这样一个可能的漏洞利用:攻击者创建一个PHP页面,该页面将向目标用户呈现虚假表单攻击者的PHP脚本将执行file_get_contents从他试图利用的目标站点下载表单(HTML),并从下载的HTML中删除CSRFt

php - 在google api中手动使 token 过期

我的谷歌token似乎需要等待60分钟才能过期。我正在尝试测试有关如何刷新token的代码是否正常工作,我没有时间等待60分钟来测试它是否正常工作。有没有办法手动使谷歌token过期,以便我可以测试我的刷新token代码是否有效? 最佳答案 通过撤销access_token,您也撤销了refresh_token,docs:Thetokencanbeanaccesstokenorarefreshtoken.Ifthetokenisanaccesstokenandithasacorrespondingrefreshtoken,there

php - 登录表单 POST 上的 Laravel 5.1 token 不匹配

我在compiled.php第2930行中收到以下错误TokenMismatchException:代码在RedHat服务器上运行php5.6我也在Ubuntu服务器上运行php5.5.9它工作得很好。它还在本地完美运行。它似乎在原始GET请求的storage/framework/sessions中创建了2个session文件,这意味着当通过POST发送表单时>session就不同了。我检查过重定向服务器上的日期/时区问题session.php和app.php中的配置问题最奇怪的是为什么在GET请求中生成了2个session文件。一旦您点击登录按钮,您就会点击csrf中间件,说toke

php - 使用 Laravel Socialite 获取谷歌刷新 token

使用LaravelSocailite连接到GoogleAPI,我可以正常恢复连接,但是此访问不会返回刷新token,因此我的连接超时。$scopes=['https://www.googleapis.com/auth/webmasters','https://www.googleapis.com/auth/webmasters.readonly','https://www.googleapis.com/auth/analytics.readonly','https://www.googleapis.com/auth/userinfo.profile','https://www.goog

php - Symfony 应用程序 403 禁止错误 : You don't have permission to access/on this server

我试图在CentOS7linode服务器上运行symfony应用程序,但出现错误:Cannotservedirectory:NomatchingDirectoryIndex(index.html,index.php)我用这个配置为这个子域设置了一个虚拟主机:ServerAdminpak11273@gmail.comServerNamemisterServerAliasproject.mystuff.comDocumentRoot/var/www/html/projectErrorLog/var/www/html/project/logs/error.logCustomLog/var/w

javascript - 如何使用 javascript 将链接设为 "access only"

我有一个arduinowebserver服务器和一个normalwebserver该服务器之间的通信使用链接系统,例如:Arduiono服务器的普通网络服务器:ArduinoServer/light1=on-灯亮ArduinoServer/light1=off-灯熄灭Arduino网络服务器到普通网络服务器:NormalWebserver/temperature=22&humidity=56&light1=onNormalWebserver/temperature=22&humidity=56&light1=off通信运行良好,但问题出在操作按钮上,当我切换灯时,我需要只是访问永恒的a

php - 我不明白 JWT 刷新 token 的行为 (LARAVEL)

我刚刚尝试使用LARAVEL和这个https://github.com/tymondesigns/jwt-auth进行JWT身份验证但是有些事情我无法理解。在他们的配置中,他们放置了:'ttl'=>env('JWT_TTL',60),//inmunutes'refresh_ttl'=>env('JWT_REFRESH_TTL',20160),//inminutes我所理解的:token的生命是1小时,可以在2周内刷新但3小时后,如果我尝试查询某些内容,它会显示“token已过期”。这个系统是否意味着,用户必须在每小时内更新/刷新他的token,但限制为2周?我不明白。用户如何使用这种系

php - Firebase FCM 错误 JSON_PARSING_ERROR : Unexpected token END OF FILE at position

我正在尝试使用php通过firebase的fcm服务发送通知。这是我到目前为止得到的:$ch=curl_init();$payload=['to'=>'/topics/'.ANDROID_TOPIC,'notification'=>['message'=>1]];$headers=['Content-Type:application/json','Content-length:'.sizeof(json_encode($payload)),'Authorization:key='.FIREBASE_KEY];curl_setopt($ch,CURLOPT_URL,'https://fc