
当用户设置特定的预定时间时,我需要在页面上自动发布.
我尝试使用Graph API和以下请求:
Bundle params1 = new Bundle(); params1.putString("message","This is a system generated post"); params1.putString("scheduled_publish_time",(date.getTime()+(1000*60*30))""); //for current time to next 30 min params1.putBoolean("published",false); new GraphRequest( accesstoken,"/850285671748182/Feed",params1,httpMethod.POST,new GraphRequest.Callback() { public voID onCompleted(GraphResponse response) { /* handle the result */ Log.d("Response-auto","DATA" + response); } } ).executeAsync();但它给出了以下回应.
{"error": {"message": "(#100) The specifIEd scheduled publish time is invalID.","type": "OAuthException","code": 100,"fbtrace_ID": "HcuHy8cusGC"}}最佳答案您必须以秒为单位设置Unix TimeStamp.以下方式将当前毫秒转换为Unix秒Long unixsecond=Calendar.getInstance().getTimeInMillis()/1000L; 总结 以上是内存溢出为你收集整理的如何在给定的预定时间内自动在Facebook页面上发布更新?使用android全部内容,希望文章能够帮你解决如何在给定的预定时间内自动在Facebook页面上发布更新?使用android所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)