我正在使用facebook 3.0.1钛模块.在Android中,Facebook apprequests对话框始终返回为已取消,即使实际的apprequest已发送,也可以在Facebook上看到.因此,我无法将请求存储在我的后端,这使得apprequest无用.
但在iOS中它工作正常.
这是我的代码
var fb = require('facebook');
fb.appid = 'my_app_id';
fb.permissions = ['publish_stream', 'read_stream', 'email']; // Permissions your app needs
fb.forceDialogAuth = true;
fb.addEventListener('login', function(evt) {
if (evt.success) {
fb.dialog("apprequests", {
message:"LeaugeNation",
// max_recipients : "2"
}, function(response) {
alert(JSON.stringify(response));
if(response.result) {
alert("send friend req");
// sendFacebookInvite(e.result);
}
});
} else if (evt.error) {
alert("error");
} else if (evt.cancelled) {
alert("cancelled");
} else {
alert("default");
}
});
fb.authorize();
Run Code Online (Sandbox Code Playgroud)
如果我运行代码我得到以下结果
{"cancelled":true,"code":-1,"success":false}
我做了以下更改,但没有得到结果.
提前致谢.
你能告诉我我想要在Android上获得正确结果的变化吗?
android titanium facebook-javascript-sdk titanium-modules titanium-mobile
我的应用内商品全部设置为通过ti.storekit在iTunes Connect中购买:

我的Appcelerator 4.0应用程序编译并部署到我的设备(开发配置文件).ti.storekit链接到我的应用程序并进行编译.在没有未处理的异常方面,它似乎也正确执行.但它告诉我它无法找到我的应用内购买产品.我已经尝试将"15键"和"15Keys"交给ti.storekit.我不确定它想要哪一个(参考名称或产品ID) - 但无论如何都不起作用.
这是ti.storekit中的函数,它产生错误消息:
function requestProduct(identifier, success)
{
Storekit.requestProducts([identifier], function (evt) {
if (!evt.success) {
alert('ERROR: We failed to talk to Apple!');
}
else if (evt.invalid) {
alert('ERROR: Invalid product: ' + identifier);
}
else {
success(evt.products[0]);
}
});
}
Run Code Online (Sandbox Code Playgroud)
正在执行"else if"行:alert('ERROR: Invalid product: ' + identifier);
我做错了什么?我应该提供参考名称(15键)或产品ID(15Keys)吗?既然我已经尝试了两者而且都不起作用,我该如何解决这个问题呢?我究竟做错了什么?
编辑:
我不清楚3件事:
1-我应该在我的ipad上进入设置并使用我的TEST USER苹果沙箱帐户登录itunes/store吗?我无法这样做,因为它一直要求我输入信用卡.我过去使用的测试信用卡(在其他非iOS系统上),如4111111111111111不起作用,我无法继续并登录.甚至不确定我是否应该这样做.如果是这样,我可以使用哪些CC凭据?我应该使用REAL CC吗?基于我在其他文章和帖子中阅读的所有内容,它表示永远不会将测试帐户链接到CC编号...那么为什么苹果不允许我登录我的测试用户到我的苹果设备(在设置内)进入信用卡?
2-我没有按照https://github.com/appcelerator-modules/ti.storekit/blob/master/ios/example/app.js中的步骤进行操作,因为在我的应用程序中没有任何内容可供下载,没有任何内容在我的应用程序中,用户可以购买密钥,这些密钥只是我应用程序中的数字实体 - 无需下载.所以我删除了与下载/托管有关的所有代码/步骤.
3-我的应用程序版本1.0.0正在等待应用程序商店中的审核.此版本没有ti.storekit,也没有应用内购买.没有.但是我正在开发一个更新的版本,包含我最新的appcelerator 4.0项目中的所有storekit和应用内购买内容.这不应该在我的开发环境中,在我连接的ipad上,在开发构建中工作吗?我有1.0.0等待审查的事实,没有storekit的东西,应该与我在我的开发帐户中使用storekit的新版本无关,对吧?我也对这条消息感到困惑:

在我的DEV商店包装工作之前,我是否需要向Apple提交新版本?如果是这样,这似乎很奇怪,好像app-store候选版本与我在本地环境中开发的东西相关联.这条消息表明为什么我的dev storekit东西不起作用?我的应用内购买产品似乎已正确配置,但我不应该在dev/sandbox中与此连接,无论应用程序商店中等待审核的1.0应用程序(没有商店套件)?
谢谢大家的帮助......我必须错过一些我没有看到的关键步骤.
我是Titanium的新移动应用程序开发人员.我想看看逐行调试.检查一些循环或代码.(特别是"ANDROID")用于检查我的应用程序"崩溃"的位置.请帮我,
提前致谢
我想构建一个iOS模块,其中我有一个带有.xib文件的viewController类.现在的问题是如何从我的钛代码中调用该视图.我知道有可用的视图代理,但由于文档不太好而不知道如何使用它们.
到目前为止我已经创建了一个可以传递非图形数据的模块,但是从我的模块中获取View控制器呢.
我已经检查了appcelerator wiki,但这没有用.任何指导我的教程都会有所帮助
titanium appcelerator appcelerator-mobile titanium-modules titanium-mobile
我使用Titanium(3.1.3)和Alloy实现了facebook登录.
但有时当我尝试登录时,我发送此消息错误.
message = "FBSession: should only be used from a single thread";
我正在开发一个与相机相关的Titanium iOS应用程序.我用过Titanium.Media.showCamera模块打开相机.
不幸的是,它只给我两个选项,即mediaTypes : [Ti.Media.MEDIA_TYPE_VIDEO, Ti.Media.MEDIA_TYPE_PHOTO].
但我正在寻找这些选择:“SQUARE”,”TIME LAPSE”,”SLOW MOTION”,”PANO”.
我正在尝试将我的旧模块重新编译为6.0.0.GA sdk作为强制要求使其在6及以上的sdk上运行.但我无法将其构建为给出错误.开发环境:
我收到此错误:
BUILD FAILED
/Users/krishna/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/module/android/build.xml:347: The following error occurred while executing this line:
/Users/krishna/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/module/android/build.xml:302: exec returned: 2
Run Code Online (Sandbox Code Playgroud)
当我尝试创建一个新模块然后构建它时.
请告诉我哪里出了问题.我认为这是因为一些环境问题.也许我的NDK版本搞砸了.
我很感谢你的帮助.
android titanium appcelerator titanium-modules appcelerator-titanium
我正在使用ZBar SDK在iPhone上读取QR码,但是我想在相机/扫描仪视图的底部添加一些文本,这些文本是用户的指导文本.这是我到目前为止:
UIView *cameraOverlayView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
cameraOverlayView.backgroundColor = [UIColor redColor];
UILabel *instructionLabel = [[UILabel alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
[instructionLabel setTextColor:[UIColor grayColor]];
[instructionLabel setBackgroundColor:[UIColor clearColor]];
[instructionLabel setFont:[UIFont fontWithName: @"Trebuchet MS" size: 24.0f]];
[instructionLabel setCenter:cameraOverlayView.center];
[cameraOverlayView addSubview:instructionLabel];
reader.cameraOverlayView = cameraOverlayView;
reader.wantsFullScreenLayout = YES;
[instructionLabel release];
[cameraOverlayView release];
Run Code Online (Sandbox Code Playgroud)
这是全班:
https://gist.github.com/4163761
不幸的是,标签没有显示.ZBar的文档说为了这个目的使用cameraOverlayView,但它似乎没有工作.
另外一点,我正在使用Titanium框架,因此这是额外的Titanium类所在的地方,但我的问题应该是针对ZBar的.
操作系统:Linux薄荷14.
当我尝试运行我的项目时发生以下错误.
[TRACE] Writing out AndroidManifest.xml
[ERROR] Exception occured while building Android project:
[ERROR] Traceback (most recent call last):
[ERROR] File "/home/aqeel/.titanium/mobilesdk/linux/3.1.0.GA/android/builder.py", line 2528, in <module>
[ERROR] builder.build_and_run(False, avd_id, debugger_host=debugger_host, profiler_host=profiler_host)
[ERROR] File "/home/aqeel/.titanium/mobilesdk/linux/3.1.0.GA/android/builder.py", line 2264, in build_and_run
[ERROR] self.manifest_changed = self.generate_android_manifest(compiler)
[ERROR] File "/home/aqeel/.titanium/mobilesdk/linux/3.1.0.GA/android/builder.py", line 1404, in generate_android_manifest
[ERROR] '-I', self.android_jar], warning_regex=r'skipping')
[ERROR] File "/home/aqeel/.titanium/mobilesdk/linux/3.1.0.GA/android/run.py", line 38, in run
[ERROR] print "[DEBUG] %s" % subprocess.list2cmdline(args_to_log)
[ERROR] File "/usr/lib/python2.7/subprocess.py", line 587, in list2cmdline
[ERROR] needquote = (" " in arg) …Run Code Online (Sandbox Code Playgroud) 我正在寻找帮助在appcelerator中集成Captuvo SL22 SDK.Captuvo SDK随附了用于ipod的Captuvo扫描仪/ msr.我试图在自定义模块中使用Captuvo SDK并在主应用程序中调用它.我可以使用自定义模块启动方法中的以下代码与Captuvo设备建立连接:
-(void) startup{
self.captuvo = [Captuvo sharedCaptuvoDevice];
[self.captuvo addCaptuvoDelegate:self];
[self.captuvo startDecoderHardware];
}
-(void) DecoderReady{
//Fire Event successfully to Titanium App
}
Run Code Online (Sandbox Code Playgroud)
启动后,我尝试通过点击应用程序中的按钮打开扫描仪,这是我的代码:
-(void) turnScannerOn{
if([self.captuvo isDecoderRunning]){
//Fire event successfully to Titanium App
[self.captuvo startDecoderScanning];
}
}
Run Code Online (Sandbox Code Playgroud)
然而,无论我尝试什么,我都无法让扫描仪打开我的生活.我正在将Titanium 3.1.1用于运行iOS 6.1的iPod touch.任何帮助将非常感激!如果我搞清楚,我一定会让别人知道!
更新:所以对此的更新是我能够做到这一点.这要到tiapp.xml进行扫描:
<ios>
<plist>
<dict>
<key>UISupportedExternalAccessoryProtocols</key>
<array>
<string>com.honeywell.scansled.protocol.decoder</string>
<string>com.honeywell.scansled.protocol.msr</string>
<string>com.honeywell.scansled.protocol.pm</string>
</array>
</dict>
</plist>
</ios>
Run Code Online (Sandbox Code Playgroud)
但是,当您第一次启动应用程序时,我无法使用按钮打开扫描仪,但侧面的触发器工作,但没有返回数据.霍尼韦尔提供了一些示例代码,我注意到这个代码添加到本机应用程序使得扫描程序在初始启动时工作,所以我想知道是否有办法在钛内部复制这个目标C代码:
- (void)viewWillAppear:(BOOL)animated
{
[[Captuvo sharedCaptuvoDevice] removeCaptuvoDelegate:self] ;
[[Captuvo sharedCaptuvoDevice] addCaptuvoDelegate:self];
[[Captuvo sharedCaptuvoDevice] startPMHardware];
[[Captuvo sharedCaptuvoDevice] startDecoderHardware];
}
- (void)viewDidDisappear:(BOOL)animated
{
[[Captuvo …Run Code Online (Sandbox Code Playgroud) titanium-modules ×10
titanium ×9
android ×3
appcelerator ×3
ios ×3
camera ×1
facebook ×1
ipod-touch ×1
objective-c ×1
zbar ×1
zbar-sdk ×1