I am having a problem in my facebook code. Currently, what I want to do is allow someone to set up a space in my app, and upload a file that can then be viewed by their friends. I cannot find any reasonable way to do this. Is it currently possible to allow Person A to view Person B's data within my app? Please, any help would be appreciated.
You'll need to store uploaded files on your own server, and associate those files with the uploading Facebook user account. When a friend visits looking for files, you can query Facebook for their friend relationships to determine which files to display to them.
Related
I am building a website using React and Redux to search facebook photos through tags like my Friends name or by location. User needs to login with facebook so that the application can read its pictures. A user simply puts in the search filters like Tagged users or the location of the picture and my app will show results based on the filters. This will help to find old photos with friends which sometimes get lost on social media due to a large number of photos present(Uploaded or Tagged)
I am trying to fetch mutual photos of me and my friends using my access token and trying to read the tags present in the photos through API but the Response contains only my name in the tags and not other people who are tagged in that photo.
Is there any way to fetch the users who are tagged on a photo uploaded? Any help is appreciated.
Graph api link
Access to any data involving your friends is only possible if those friends specifically authorized your App too. You cannot even get an ID of a friend if he did not authorize your App.
Yes, in order to access involving your friend to authorize your app. But from the details i can see that,
"A user access token may read a photo that the current user is tagged in if they have granted the user_photos or user_posts permission. However, in some cases the photo's owner's privacy settings may not allow your application to access it."
Note: Just need to verify users privacy setting once again.
I am trying to keep track of my users' facebook friends. I thought that using the webhook is the best solution to this problem.
The webhook is currently working, the request I get from facebook is a json of 2 objects (users), who added each other as friends, so I am able to update them in the database.
For some reason I sometimes get an object of only one user, and I get the other friend in a seperate object. There is no way for me to relate the 2 requests together.
I have read through the whole document but it didn't help https://developers.facebook.com/docs/graph-api/webhooks/v2.5
Is there something that I am doing wrong, or is just using the webhooks for this task is not the right solution? If it's not the solution, should I scrape all my user's facebook friends periodically?
I manage a domain of users and would like to be able to transfer all the documents of a user to another user. As far as I understand the best way to achieve that is to find the fileID's of all files belonging to one user and transfer them to another user. However, I have problem constructing a query.
UPDATE:
So the correct query to retrieve the list of files would be:
response = drive_service.files().list(q="'user#company.com' in owners").execute()
However, it only works for me as an admin. If I try to retrieve the list of files for any other user in my domain it returns an empty list.
Files.list will retrieve all the user's files, in this case it will get all your own files. In order for that query to work would be only if that user is also owner one(or more) of your files.
Even as an admin you cannot access users files directly.
To access other user's files, as an admin you need to impersonate the users and then perform actions in their behalf.
This is achieved by using a service account with domain wide delegation of authority.
Here you can find more information on that as well as a python example.
Hope it helps.
If you want to transfer all the files of one user into another user's Drive, the easiest way would be to use the Data Transfer API provided by Google. This way you don't have to list the files and transfer them one by one. Also you only need the admin access token and wouldn't need domain wide delegation either. You can get the official documentation here
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.
I am trying to build an application with ColdFusion.
I've been reading documentation and trying things out for days and for the life of my I can't seem to figure out how to display my own data to users from Google's APIs using OAuth2.
For example, I want to be able to display some of my stats to users with the Google Analytics API. How many unique hits, page views my site gets and from what countries. The data is private, however, so there isn't a way to do so. Or YouTube just changed their API so video tags can no longer be seen unless logged in. I want to be able to show my video tags so they can search for related things on my own site, but I can't pull them because I'm unsure of how to do this.
I know how to display and manipulate public data, but when it comes to private data, I'm at a complete loss. OAuth2 is kicking my butt!
Is there anybody that can please, please help me with OAuth2 so that I can allow my users to see my private Google data without there being any kind of log in process for them? Examples using ColdFusion would be so much appreciated.
The answer is more or less what I said at How to retrieve my own private playlist through YouTube API?
You'd want to use the OAuth 2 for Installed Applications flow, and generate new access tokens via your refresh token when your old access token expires. I'm not familiar with any libraries for doing OAuth 2 in Cold Fusion, though.