Skip to content

Commit

Permalink
Merge pull request #857 from vladnicoara/fb-if
Browse files Browse the repository at this point in the history
LB-1944 Facebook search only when having appId
  • Loading branch information
nistormihai committed Sep 9, 2014
2 parents d3afbc9 + 5ee4a36 commit 0ed0504
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def createBlogMediaTypes():
'sms': (False, '', '', ''),
'comments': (False, '', '', ''),
'google': (False, 'www.google.com', 'xml', ''),
'facebook': (False, 'www.facebook.com', 'xml', 'change-this-to-a-real-appid'),
'facebook': (False, 'www.facebook.com', 'xml', ''),
'twitter': (False, 'www.twitter.com', 'xml', '{"ConsumerKey":"uLW0hK2KZosj8Yl4F17uKg","ConsumerSecret":"iRuM0j8pyUTYgbpwPLqAl9wTBn5JzQB4zLJaiUaEdyE"}'),
'flickr': (False, 'www.flickr.com', 'xml', 'abf46ef4c670460e95d09cf368606b8a'),
'youtube': (False, 'www.youtube.com', 'xml', ''),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ define('providers/facebook', [
tokenInterval: 0,
tokenRefreshTime: 3000,
data: [],
init : function() {
init : function(author, appId) {
if(!this.initialized || !this.el.children(":first").length) {
//this.render();
this.adaptor._parent = this;
this.adaptor.init();
this.adaptor.init(author, appId);
}
this.initialized = true;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,10 @@ define([

$.extend(providers.facebook, {
adaptor: {
init: function() {
init: function(author, appId) {
var self = this;
new $.restAuth('Data/Collaborator/')
.xfilter('Id, Source.Key')
.request({data: { 'qs.name': 'facebook'}})
.done(function(collabs) {
self.appId = '';
if($.isDefined(collabs[0])) {
self.author = collabs[0].Id;
//self.appId = '540742825976268';
if ( collabs[0].Source.Key ) {
self.appId = collabs[0].Source.Key;
}
self._parent.loadFbConnect(self.appId);
}
});
self.author = author;
self._parent.loadFbConnect(appId);
},
universal: function(obj) {
var meta = jQuery.extend(true, {}, obj);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0ed0504

Please sign in to comment.