19
19
20
20
static NSString *const XMPPFacebookChatHostName = @" chat.facebook.com" ;
21
21
22
+ static char facebookAppIdKey;
23
+
22
24
// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
23
25
#pragma mark -
24
26
// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -241,7 +243,7 @@ - (NSString *)facebookAppId
241
243
__block NSString *result = nil ;
242
244
243
245
dispatch_block_t block = ^{
244
- result = objc_getAssociatedObject (self, " facebookAppId " );
246
+ result = objc_getAssociatedObject (self, &facebookAppIdKey );
245
247
};
246
248
247
249
if (dispatch_get_current_queue () == xmppQueue)
@@ -257,7 +259,7 @@ - (void)setFacebookAppId:(NSString *)inFacebookAppId
257
259
NSString *newFacebookAppId = [inFacebookAppId copy ];
258
260
259
261
dispatch_block_t block = ^{
260
- objc_setAssociatedObject (self, @" facebookAppId " , newFacebookAppId, OBJC_ASSOCIATION_RETAIN_NONATOMIC );
262
+ objc_setAssociatedObject (self, &facebookAppIdKey , newFacebookAppId, OBJC_ASSOCIATION_RETAIN_NONATOMIC );
261
263
};
262
264
263
265
if (dispatch_get_current_queue () == xmppQueue)
@@ -288,7 +290,7 @@ - (BOOL)authenticateWithFacebookAccessToken:(NSString *)accessToken error:(NSErr
288
290
{
289
291
XMPPXFacebookPlatformAuthentication *facebookAuth =
290
292
[[XMPPXFacebookPlatformAuthentication alloc ] initWithStream: self
291
- appId: nil
293
+ appId: self .facebookAppId
292
294
accessToken: accessToken];
293
295
294
296
result = [self authenticate: facebookAuth error: &err];
0 commit comments