我对Meteor和Twitter有点问题.我想做的就是通过点击按钮发布推文.为此,我必须通过Oauth对Twitterservice进行身份验证.
目前,我正在以一种非常复杂的方式进行身份验证,从客户端到服务器并返回.但现在我找到了Meteor.loginWithTwitter功能.最初我认为这个功能只是用于使用Twitterkeys将您登录到自己的应用程序中,现在我不再那么肯定了.也许我也可以用它来解决我的问题.因为看起来Oauth-Process完全(以简单的方式)在Meteor中实现.
可悲的是,我找不到任何文档或示例,只需登录并获得最终的oauth_token.所以我从Meteor得到的所有东西然后我尝试以下代码,这是错误消息:
Erromessage:Accounts.ConfigError {message:"Service not configured"}
Meteor.loginWithTwitter( function(err){
if (err){
console.log(err)
}else{
console.log("yeah");
}
});
Run Code Online (Sandbox Code Playgroud)
我知道我必须在某个地方输入我的Appinformation,比如Consumer键,但我不知道在哪里.有人可以帮助我,并为我知道一些例子吗?或者知道我是否走在正确的轨道上?
谢谢和问候菲利普
我的PhoneGap-App for Android中的下载文件有问题.我认为PhoneGap的下载功能实际上运行得很好.它从URL获取文件并将其存储在SD卡上.(代码如下)
那么问题出在哪里?当我将JPG或PNG下载到Download-folder时,我希望它可以通过本机Gallery访问.但这幅画并没有出现在画廊里.要看到它我必须重新启动手机或我必须使用另一个应用程序,如Astro.
是否有"Refresh_the_native_Gallerie"功能或类似的功能?
非常感谢你.
try {
var filePath = 'file:///mnt/sdcard/Download/google.png'; // Correct filePath
var url = "https://www.google.de/images/srpr/logo3w.png"; //Correct URL
var fileTransfer = new FileTransfer();
fileTransfer.download(url, filePath, function(entry) {
console.log("s3_download download complete: " + entry.
// Do i need a "Refresh_all_other_Apps"-function here?
}, function(error) {
// Normally no Error
console.log("s3_download download error source " + error.source);
console.log("s3_download download error target " + error.target);
console.log("s3_download download error code" + error.code);
});
} catch (e) {
console.log("downloadTest …Run Code Online (Sandbox Code Playgroud)