小编mfs*_*ymb的帖子

Facebook API视频观看

我想在我的Facebook页面上获取视频的视图.

我的请求:

{object-id}/insights/post_video_views_organic
Run Code Online (Sandbox Code Playgroud)

但是,而不是数据,我得到以下错误:

{
  "error": {
    "message": "(#100) Tried accessing nonexisting field (insights) on node type (Video)", 
    "type": "OAuthException", 
    "code": 100
  }
}
Run Code Online (Sandbox Code Playgroud)

我以前没有真正使用Facebook API,所以我无法真正翻译此错误消息.(我正在使用Graph API Explorer)

facebook facebook-graph-api

12
推荐指数
1
解决办法
5770
查看次数

YouTube Analytics API php示例

我想通过PHP Client Libary制作此YouTube Analytics请求

https://www.googleapis.com/youtube/analytics/v1/reports  
?ids=channel==CHANNELID
&start-date=STARTDATE
&end-date=ENDDATE 
&metrics=views,  
estimatedMinutesWatched,  
averageViewDuration,  
comments,  
favoritesAdded,  
favoritesRemoved,  
likes,  
dislikes,  
shares,  
subscribersGained,  
subscribersLost  
&dimensions=7DayTotals 
&fields=rows  
&sort=day  
Run Code Online (Sandbox Code Playgroud)

这可能吗?是否有关于如何从API获取YouTube Analytics报告的PHP代码示例?
在Google Developers页面上找不到.(https://developers.google.com/youtube/analytics/v1/code_samples/)

谢谢

php youtube youtube-api youtube-analytics

3
推荐指数
2
解决办法
5134
查看次数

Laravel 4身份验证不使用子域

在我的L4应用程序中,我使用子域名来路由到不同的东西.

accounts.domain.com = where alle the Authentication stuff happens
dashboard.domain.com = The main frontpage for authenticated users
community.domain.com = Community stuff for authenticated users.
Run Code Online (Sandbox Code Playgroud)

如果有人访问community.domain.com/forum并且未进行身份验证,则应将其发送至accounts.domain.com,登录,然后重定向回论坛.

但现在我有两个问题.1和主要问题:登录后,用户只对该域进行了认证:accounts.domain.com用于所有其他域,并将其重定向到登录名.如果用户是autenticated并尝试访问dashboard.domain.com,则会将其重定向到登录页面.

2.问题是登录后的重定向.Atm我在登录后只有一个静态重定向,无论用户来自哪里都无关紧要.如何更改它以便将其重定向回到他之前作为未经身份验证的用户访问过的页面?我的路线档案:

Route::get('login', function()
{
    return Redirect::action('AccountsController@getLogin');
});

Route::group(array('domain' => 'accounts.domain.com'), function()
{
    Route::get('/', function()
    {
        return Redirect::action('AccountsController@getLogin');
    });

    Route::get('users/sing_in', array('as' => 'login', 'uses' => 'AccountsController@getLogin'));
    Route::post('users/sing_in', array('as' => 'login', 'uses' => 'AccountsController@doLogin'));
    Route::get('users/sing_out', array('as' => 'logout', 'uses' => 'AccountsController@doLogout'));


    Route::group(array('before' => 'auth'), function() {
        Route::get('users/profile', array('as' => 'profile', 'uses' => 'AccountsController@getProfile'));
    });

});


Route::group(array('domain' …
Run Code Online (Sandbox Code Playgroud)

php laravel laravel-4

3
推荐指数
1
解决办法
2509
查看次数