Sharing large pictures with a facebook application - facebook-graph-api

How do I share a big picture from an application?
We have an application with a trivia quiz, but we can only share small pictures.
Is it possible to share a picture at the original size?
here is the link for testing the apps:
https://www.facebook.com/LeChampionDeBlueExorcistCommunity?sk=app_374441249291232

Use Open Graph to share stories with (large) user generated action photos.
The documentation is here: https://developers.facebook.com/docs/opengraph/usergeneratedphotos/
Something like this will work, in conjunction with an Open Graph action post.
https://graph.facebook.com/me/yournamespace:cook?
recipe=http://www.yourdomain.com/pizza.html&
image[0][url]=http://www.yourdomain.com/images/my_camera_pizza_pic.jpg&
image[0][user_generated]=true
You can also post a photo to a user's albums using the https://developers.facebook.com/docs/reference/api/photo/ API
Which you choose to use partly depends on the use case you have in mind.

Related

In general how are likes and recommendations usually handled on sites like Reddit, YouTube, and Facebook?

For example when you hit the like / upvote button it affects the future recommendations you receive.
At a high level how do sites determine all of this information?
Every time you hit the like/dislike button does it automatically make a call to the backend and update your recommendations list?
Or does it wait a bit before it does that in case you hit like by accident? What would happen if you just spam and keep liking and unliking a particular video or post?
this is done by many ways:
FaceBook:
1- when you stay reading the post for a long time or hit like, then you are
interested about the content that is offered in this post.maybe in the database there are categories for the data related to posts and offers according to it. also facebook has strong backend which can analyze photos and according to it's data, it may save it in the DB. this is done by image recognition using python. most people also allow facebook accessabilty for apps on their phones, this allows facebook to collect data about your interests. recommendations also based on your FB data, like age, location, friends and other data. when you admire something, the next time you refesh or opens facebook, a call to backend is made and then it returns data according to some cases according to user data and specifications.
Reddit
this mostly depends on text analysis because it is mostly reading posts. and by the same way like facebook it shows data
YouTube
here it maybe a little bit different because here the backend will analyze the videos you watch, channels, and other videos related json data (if you have dealed with yt_dl you will understand me)
you asked about when will the user preferences be updated?. i think this is done when you refresh or open the app again

How to Assign States to Viewers of Django Web Application?

Problem Statement
I'm working on building out a single-page Django web app and am trying to implement the following functionality:
- All viewers of the page are associated with a state. There are buttons on the page which enable viewers to change their state.
- The application stores a list of all current viewers of the page, and their associated states. Whenever a user changes their state, this stored list of viewers updates with this new information.
- The application should display how many people are online (viewing the page) at a given time.
Blockers
I'm unsure of how to collect a list of all current viewers of a page in Django, nor how to collect how many users are currently viewing the page.
Ideally, my application would not require a login to use: therefore, I'd rather either associate viewer state with a user object that doesn't require sign-in, or not associate viewer state with a user object (I'm still new to user objects though, so forgive me if this point doesn't make complete sense).
What I'm Looking For
A discussion of higher-level strategies which I can use to implement this functionality, or other places to look to gain insight in tackling my problem. I'm pretty new to Django, so I'd appreciate it if answers also direct me to locations in my Django project which are of relevance (e.g. "Consider doing X in views.py, then..."). Alternatively, if there are GitHub projects you know of with similar functionality, if you could direct me to them to investigate further, that would also be appreciated.
I'd be happy to offer further clarification as required. Thanks in advance!

Birds eye view of how to place video's into Facebook timelines

We're trying to have users share 'articles' on a simple website into their timelines. Each article is associated with a video and we would like to use that video in the representation of the article in a users timeline. Now, I've read that linking to an mp4 via open graph meta tags isn't possible anymore. So I presume I should be using the graph api.
Could someone confirm that this is true?
And if so can you give a quick run down of the necessary steps achieve this?
Thanks

How to allow user to access their FB album and share an image from their album

I was recently asked if it were possible to allow a visitor to upload their own images from their facebook album to our site.
So the visitor would click "Upload from FB" they click it and they have to give permission for our site to access their account. They would then choose an image from their albums and essentially upload that image into our site.
Can something like this even be done?
I know I can access albums using the graph api. Are there any legal or privacy issues in doing so?
1 - From Facebook developers policy section II, 2.
You may cache data you receive through use of the Facebook API in
order to improve your application’s user experience, but you should
try to keep the data up to date. This permission does not give you any
rights to such data.
You should read this document as it provides all the legal answers regarding the platform.
2 - On the technical side of the question, yes it can be done - there are many facebook application that lets you browse your photos and add effect to it such as Aviary Editor
Take a look at the code here: https://github.com/bearlake/putafilteronit/blob/master/index.php
The code is pretty messy as I never cleaned it up but it shows how I pulled in FB albums and allowed a user to choose a picture.

Obtaining the location of places on facebook and integrating it into window phone app

I am trying to obtain information of a users current location I already have the users latitude and longitude what I want to know is are there any businesses (restaurants, clothing stores ect.) in that area. I was just looking at the open graph api and It says that you can search over all public objects in the social graph with https://graph.facebook.com/search. We support searchs for the following types of objects: places https://graph.facebook.com/search?q=coffee&type=place but the ones I really want to use type=location&center=37.76,-122.427&distance=1000 does not work in the API Explorer could anyone tell me what might be the problem and how do I use this in a windows phone 7 app? Links, code snippets, blog post, ebooks, Other web services that would allow me I could send lat and long and will return the location or businesses anything will be very helpfull thanks
https://graph.facebook.com/search?q=coffee&type=place&center=37.76,-122.427&distance=1000
This query should give you the results you need.