Comments (6)
Hi @lukasz-kaniowski ,
How about exposing an new API setInitFunction()
in configuration state?
Usage example
app
.config(function ($FBProvider, $window) {
var customInitFunction = function () {
$window.Parse.FacebookUtils.init({
appId : 'YOUR_APP_ID', // Facebook App ID
status : true, // check login status
cookie : true, // enable cookies to allow Parse to access the session
xfbml : true // parse XFBML
});
};
// Using this API will override the $FBProvider.setInitParams configuration
$FBProvider.setInitFunction(customInitFunction);
});
If you think this works for you, I'll open a new feature branch later for you to try it out.
from angular-easyfb.
Sounds like a good plan. Thanks.
On Monday, December 23, 2013, Robin Fan wrote:
Hi @lukasz-kaniowski https://github.com/lukasz-kaniowski ,
How about exposing an API in configuration state?
Usage example
app
.config(function ($FBProvider, $window) {var customInitFunction = function () {
$window.Parse.FacebookUtils.init({
appId : 'YOUR_APP_ID', // Facebook App ID
status : true, // check login status
cookie : true, // enable cookies to allow Parse to access the session
xfbml : true // parse XFBML
});
};// Using this API will override the $FBProvider.setInitParams configuration
$FBProvider.setInitFunction(customInitFunction);
});If you think this works for you, I'll open a new feature branch later for
you to try it out.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-31104515
.
Lukasz Kaniowski
Connect with Me: http://www.linkedin.com/in/lukaszkaniowski
http://twitter.com/lkanio
http://lukaszkaniowski.com/ https://github.com/lukasz-kaniowski
https://github.com/lukasz-kaniowski
Contact Me: lukasz.kaniowski
from angular-easyfb.
I Just pushed a new branch feature/setInitFunction for the $FBProvider.setInitFunction
.
The commit is here c32b9b4.
Please take a look and let me know how's it work.
Here's the example for Parse.com init. (I didn't test it)
app
.config(function ($FBProvider, $window) {
/**
* Custom init function is injectable
*/
var customInitFunction = ['$window', '$fbInitParams', function ($window, $fbInitParams) {
// You may access initParams via `$fbInitParams`:
// $window.Parse.FacebookUtils.init($fbInitParams);
// or just ignore it:
$window.Parse.FacebookUtils.init({
appId : 'YOUR_APP_ID', // Facebook App ID
status : true, // check login status
cookie : true, // enable cookies to allow Parse to access the session
xfbml : true // parse XFBML
});
}];
$FBProvider.setInitFunction(customInitFunction);
});
from angular-easyfb.
It seems to work fine.
It is still require to setup appId via setInitParams though. Can you please change validation code to if (!_initParams.appId && !_initFunction) {
at line 148.
from angular-easyfb.
I just pushed an update which have version 0.2.1 merged with a little modification.
Please give it a try.
from angular-easyfb.
It works fine. Thanks
from angular-easyfb.
Related Issues (20)
- Facebook Comment And Like Track HOT 9
- Page Plugin not loading on iPad Safari iOS 9.2.1 HOT 1
- "Main" field in package.json is wrong HOT 2
- Upload photos from camera source HOT 3
- Won't initialize when `xfbml: false` given
- Unsupported Browser:: Facebook login does not work from chrome on iPhone. HOT 2
- Minified version of 1.4.4 causes injector error HOT 2
- Dynamic set the locale HOT 2
- Get ezfb to work with import HOT 2
- To show all public posts that are present in Page or a person in facebook?? HOT 3
- apk file created by android studio using ionic framework not working HOT 2
- facebook endpoint changed from *.net to *.com HOT 2
- Angular2 Version? HOT 2
- can i make the custom fb like button and call some controller function on click of that button. HOT 1
- doesn't render FB login button after navigating to different page and back HOT 3
- long-lived token
- How to use fb-login-button directive HOT 1
- In Android device error getting the sdk
- Login Button doesn't work HOT 3
- No way to exchange short-term tokens for long-term tokens
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-easyfb.