Skip to content

Commit b45ac56

Browse files
author
Joe Wilm
committed
Rename native plugin js function handles
The methods exposed by FB still have the same names, but the functions themselves have been renamed to reflect that they wrap the native plugin.
1 parent d7b874a commit b45ac56

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

js/native/pluginImpl.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function createNativeFacebookWrapper () {
102102
// Return an object that looks just like the standard javascript facebook
103103
// interface
104104
return {
105-
init: function FBinit (opts) {
105+
init: function FBNativeInit (opts) {
106106
// ResponseTransformer resolves api discrepancies between javascript,
107107
// iOS, and Android.
108108
var transform = ResponseTransform.getTransformer(opts);
@@ -131,7 +131,7 @@ function createNativeFacebookWrapper () {
131131
* @param {object} [params]
132132
* @param {function} callback
133133
*/
134-
api: function FBapi (path, method, params, cb) {
134+
api: function FBNativeApi (path, method, params, cb) {
135135
// Handle overloaded api
136136
var opts;
137137
if (typeof method === 'function') {
@@ -190,7 +190,7 @@ function createNativeFacebookWrapper () {
190190
* @param {object} params - requires `method` and has various extra things
191191
* based on the dialog. We currently support the requests dialog.
192192
*/
193-
ui: function FBui (params, cb) {
193+
ui: function FBNativeUi (params, cb) {
194194
var transform = this.transform;
195195
nativeFB.request('ui', params, function (res) {
196196
return cb(transform.ui(params, res));
@@ -201,7 +201,7 @@ function createNativeFacebookWrapper () {
201201
* @method getLoginStatus
202202
*/
203203

204-
getLoginStatus: function FBgetLoginStatus (cb) {
204+
getLoginStatus: function FBNativeGetLoginStatus (cb) {
205205
nativeFB.request('getLoginStatus', cb);
206206
},
207207

@@ -222,23 +222,23 @@ function createNativeFacebookWrapper () {
222222
* The callback will be resolved with a {FBLoginResponse}
223223
*/
224224

225-
login: function FBlogin (cb, data) {
225+
login: function FBNativeLogin (cb, data) {
226226
nativeFB.request('login', data, cb);
227227
},
228228

229229
/**
230230
* @method logout
231231
*/
232232

233-
logout: function FBlogout (cb) {
233+
logout: function FBNativeLogout (cb) {
234234
nativeFB.request('logout', cb);
235235
},
236236

237237
/**
238238
* @method getAuthResponse
239239
*/
240240

241-
getAuthResponse: function FBgetAuthResponse (cb) {
241+
getAuthResponse: function FBNativeGetAuthResponse (cb) {
242242
nativeFB.request('getAuthStatus', cb);
243243
},
244244

@@ -247,10 +247,10 @@ function createNativeFacebookWrapper () {
247247
*/
248248

249249
Event: {
250-
subscribe: function FBEventSubscribe (event, cb) {
250+
subscribe: function FBNativeEventSubscribe (event, cb) {
251251
nativeFB.subscribe(event, cb);
252252
},
253-
unsubscribe: function FBEventUnsubscribe (event, cb) {
253+
unsubscribe: function FBNativeEventUnsubscribe (event, cb) {
254254
nativeFB.unsubscribe(event, cb);
255255
}
256256
}

0 commit comments

Comments
 (0)