Android 通过非开发者facebook帐户在facebook上发布故事的问题
我正在尝试使用facebook android api在facebook上发布一个故事。我观察到的问题是,只有那些在developers.facebook.com上注册为该应用程序开发人员的账号才会在fb上发布故事 你能告诉我这种行为的原因是什么吗?我是否遗漏了一些应该包括在facebook上使用其他facebook帐户发布的内容 以下是我在fb上发布的代码: Android应用程序:Android 通过非开发者facebook帐户在facebook上发布故事的问题,android,facebook,Android,Facebook,我正在尝试使用facebook android api在facebook上发布一个故事。我观察到的问题是,只有那些在developers.facebook.com上注册为该应用程序开发人员的账号才会在fb上发布故事 你能告诉我这种行为的原因是什么吗?我是否遗漏了一些应该包括在facebook上使用其他facebook帐户发布的内容 以下是我在fb上发布的代码: Android应用程序: private void publishStory() { Session session = Ses
private void publishStory() {
Session session = Session.getActiveSession();
if (session != null){
// Check for publish permissions
List<String> permissions = session.getPermissions();
if (!isSubsetOf(PERMISSIONS, permissions)) {
pendingPublishReauthorization = true;
Session.NewPermissionsRequest newPermissionsRequest = new Session
.NewPermissionsRequest(this, PERMISSIONS);
session.requestNewPublishPermissions(newPermissionsRequest);
return;
}
System.out.println("couponId " + deal.couponId);
Bundle params = new Bundle();
// params.putString("deal", "http://69.28.95.165/atc/cdv2/web/FBredirect.php?index="+deal.couponId);
// params.putString("deal", "http://69.28.95.165/atc/cdpk/web/FBredirect.php?index="+deal.couponId);
System.out.println("Publishing on fb::::");
params.putString("deal", "http://texastech.tk/cd3/FBredirect.php?index="+deal.couponId);
Request.Callback callback= new Request.Callback() {
public void onCompleted(Response response) {
}
};
Request request = new Request(session, "me/citydealweb:avail", params,
HttpMethod.POST, callback);
RequestAsyncTask task = new RequestAsyncTask(request);
task.execute();
}
}
以下是我的服务器端脚本:
<?php
$index = $_REQUEST['index'];
include 'DBConfig.php';
$query = "select * from outlets o join coupons c on o.OutletId=c.OutletId where c.CouponId=$index";
$result = mysqli_query($con, $query);
$row = mysqli_fetch_array($result);
$image = "img/citydeals.jpg";
if($row['OutletImage'] != ""){
$image = $row['OutletImage'];
}
?>
<html>
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# citydealweb: http://ogp.me/ns/fb/citydealweb#">
<title>Geeky N Techy</title>
<meta property="fb:app_id" content="1420361048183154" />
<meta property="og:title" content="<?php echo $row['OutletName']?>" />
<meta property="og:image" content="http://texastech.tk/cd3/<?php echo $image;?>" />
<meta property="og:url" content="http://texastech.tk/cd3/FBredirect.php?index=<?php echo $index;?>" />
<meta property="og:type" content="citydealweb:deal" />
<script>
window.location.replace("http://texastech.tk/cd3/index.php?index=<?php echo $index;?>");
</script>
</html>
如果您转到应用程序的设置,并单击左侧菜单中的“状态和审阅”选项卡,则会有一个选项,用于确定是否要使此应用程序及其所有live功能对公众可用?如果您希望任何人都能使用您的应用程序的Facebook功能,请将该选项设置为“是”。该选项已设置为“是”。在将该应用程序用于公众之前,还有一个提交该应用程序的选项,这与此问题有关吗?是,你的应用程序的自定义操作以及其他权限需要获得批准才能供公共用户使用。我已获得发布故事权限的批准,但仍然无法通过非开发者facebook帐户发布故事