Skip to content

Latest commit

 

History

History
55 lines (33 loc) · 1.52 KB

README.md

File metadata and controls

55 lines (33 loc) · 1.52 KB

ua-facebook-picture

AngularJS directive to show the Facebook profile picture of the logged in user using UserApp.

Requirements

Usage

Download and include the ua-facebook-picture.js file in your index.html:

<script src="js/ua-facebook-picture.js"></script>

Then in app.js, add it to your app's dependencies:

angular.module('myApp', [..., 'UserApp', 'UserApp.facebook-picture']);

And last, in your templates, show the profile picture with the following code:

<img ua-facebook-picture>

Note: The directive caches the result from UserApp to save API calls.

Types

Facebook allows you to get different sizes of the picture. Use the ua-facebook-picture directive to specify which type you want. You can choose from these types: square, small, normal, large

<img ua-facebook-picture="large">

You can also use the attributes width and height to specify the exact size in pixels.

<img ua-facebook-picture width="16" height="16">

Read more about it in Facebook's API Graph Reference.

Help

Contact us via email at [email protected] or visit our support center. You can also see the UserApp documentation for more information.

License

MIT. See LICENSE.