Reputation: 31
In our Angular JS application, we have login with Facebook and share to Facebook functionality. For login with facebook, we have an app Id. We go through the setup routine and FB.init is called with this App ID. When it comes to share, we want to share to facebook using a different APP ID. So my question is how to handle this scenario as I already did FB.init once with login APP ID?
1) I checked Facebook documentation and couldn't find if init accept's two App ID's in the first place.
2) Other idea is, can I create one more object for Facebook SDK that will be named some thing else instead of FB, so that I can call init on this new object?
Upvotes: 3
Views: 1904
Reputation: 1211
Unfortunately, there's no built-in noConflict
pattern. You might look at the somewhat related Multiple fbAsyncInit's? for inspiration.
You'll want to chain the window.fbAsyncInit
callbacks and then capture/store the resulting window.FB
object as something else.
Upvotes: 1