Sorry for this answer coming two years later, but maybe this will help someone.
Once you know the user's secret token and token, you can subscribe to your channel using the following OAUTH POST request. This URL is for an activity feed.
<?php
$consumerKey = "lajsdf23l4l8asdfn238ladf8xjk92oi";
$consumerSecret = "l8adl3halsdf82p9adfads2gjadsf";
$oauth = new OAuth($consumerKey,$consumerSecret,OAUTH_SIG_METHOD_HMACSHA1,OAUTH_AUTH_TYPE_AUTHORIZATION);
$usersToken = "k28a9wifvnc89w2o8oigaad8e23r23jf";
$usersSecret = "234o8fdofsy8df89aydfoyo84e2902af";
$oauth->setToken($usersToken,$usersSecret);
$subscriptionURL = "https://api.fitbit.com/1/user/-/activities/apiSubscriptions.json";
try{
$oauth->fetch($subscriptionURL, null, OAUTH_HTTP_METHOD_POST);
print_r(json_decode($oauth->getLastResponse()));
}
catch(Exception $e){
echo 'ERROR:';
print_r($e);
print_r($oauth->getRequestHeader('POST', $url));
}
Your subscriber's endpoint should be a web page where you have a code that can receive Fitbit data and do whatever you need. Below is the PHP code to get you started.
<?php
$fitbitPushData = file_get_contents("php://input");
$fitbitData = json_decode($fitbitPushData);
RequestBin http://requestb.in/ URL . , , Fitbit, - . JSON URL- , , URL .
, :
URL- . URL- , Fitbit, . Fitbit URL- , 10% , 3 .
, . , . API . 150 API , . , , Fitbit, , .