Facebook tag videos - php

I'm looking for some advice on if the following is possible
I know it's possible to upload videos via the facebook API, but is it also possible to tag users to those videos? It seems you can with photos, just not videos?
Is it possible to run an application on my facebook account which a visitor can give permissions to access their account video section, instead of having the user install the application to their account?
Here's what I'm trying to do
Video archive -> User visits a profile with an application installed, selects something, and the application then posts the video to it's own video section on the account that's stored on facebook, and tags the user who requested it
I'm basically wanting to bypass having the user install the application on their profile, and trying to have just one application running on a "host" profile.
If that makes sense, if not, please request some more information. The facebook API system is pretty much a minefield for new developers

Using the Facebook Graph API it does not currently seem possible to tag a user in a video. Facebook are still migrating their old APIs to the new Graph API format, so it seems likely that this will be an option in the future.

Related

Granting permanent access for youtube account through Youtube API

I'm trying to create a smoother video scheduling system for myself to publish my videos on time. The current system uses AutoHotkey to grant access for the script by navigating the account select page. I'd like the script to be able to get access on it's own.
It is written in PHP and uses the Google client library for PHP.
The problem I've encountered is that I can only get permanent access using my main google account (which gets a refresh token), but this account doesn't have access to my youtube account, and can't see private videos.
When I select the youtube account it has access to the videos, but does not get a refresh token, just an access token which expires after 1 hour.
The script is currently using client details from the developer console to get access. I've also tried using a service account, but haven't been able to get it to work.
There the issue there is that I don't know how to impersonate the youtube account, only the main account, which don't have access to the videos.
I finally managed to figure this out. Hidden in the Google Plus settings for my youtube channel account is a "username" for the account.
things#pages.plusgoogle.com
Using this as the impersonation target for the service account allowed it access to the channel, allowing it to publish videos!
I stumbled upon this quite by accident. Nowhere did I find any documentation on how to do this. Bah google.

Do I need to create a full app to use the Facebook SDK?

I'm working on a custom wordpress plugin for my site. I have multiple accounts so I'll need multiple feeds. I'm using the Fascebook SDK v3 (My server has an older version of PHP that the newest SDK doesn't work on). I've downloaded and included the correct files, no errors.
I then logged into one of my accounts and created a new app to get the App ID and Secret Key. However, my plugin doesn't work because it says it's not "live".
I need to do a submit and review that requires icons, screenshots, etc. However, I don't want my app available to everyone just my page.
You don't need to create a Facebook app for this. Apps are for situations where you need to access or modify information on other users' accounts. In situations like this one, where you only need to work with information which you personally have access to, the Facebook Graph API should be sufficient.
You will need to create a page access token for the page in question, then access endpoints related to the page to get information on the page, or read its posts.

Getting all posts related data for a facebook page

For my web application - I need to fetch all the data for a particular facebook page. What kind of permissions do I need. Do I really need to create a canvas app for it?
I dont intend to do anything on FB - but use some of the data available to arrive at some conclusions in my web based application which will be hosted on a server outside of FB.
Facebook's API documents should provide everything you need:
https://developers.facebook.com/docs/graph-api/reference/v2.1/page
According to the permissions section, you'll need either an App token or a User token. Since you're talking server-to-server (I'm assuming this is server-to-server on account of the PHP tag), you're going to want to use an App token:
https://developers.facebook.com/docs/facebook-login/access-tokens#apptokens
You should be able to create a Facebook App from within your Facebook account, which will provide you with an App ID and App Secret. You can use those to make calls directly to the API.

Can i configure a Facebook app with multiple domains?

I've seen this question earlier on your website, but it didn't quite help me out yet...
Here is what I'm trying to achieve:
I have a Content Management System (PHP) that is installed on the server of the various websites of my customers. Whenever a user posts a new message on his website, a shorter version of this message is sent to social media sites. Right now, this is possible with twitter (using the OAuth library). But I would want it to work with facebook too....
When I create an app in Facebook i HAVE to assign ONE return URL. But because the to-be-used CMS system can be anywhere, it's quite useless to me?
Or is there a way to make this work?
Best regars, Robert
I'm not sure your exact need for the return URL here. However, having the CMS communicate with Facebook from the server side would be performed with the Graph API with the OpenGraph protocol. This sounds like what you are doing with Twitter's OAuth.
You can then code your CMS to use your API credentials and never leave the CMS server. There is even a PHP SDK available for Facebook which sounds like it would integrate well for you.
If the CMS is at a different URL for each individual, then they each need to create an app on their Facebook profile to add the communication in this method. Because Facebook requires the basename of the URL to be the same by design, for security. This is typically performed by enabling the end-user to configure their own "app" in their profile for communication and is very commonly done with Wordpress applications for the same purpose.

Facebook app - don't request permission to get users data

I've created a simple Facebook app that doesn't need any data/info from users. When I try to view the app on Facebook, it's requesting permission to access my personal info.
I want the app to display without this request, for both logged in and not logged in users.
What's the code to do this?
Edit with more info:
I have a working Facebook app which I want to leave alone, I've duplicated the apps code and created a new app through the Facebook dev area. I've changed the relevant App ID, API ID and Secrets throughout the code. The original app works without any permission needed, but my duplicated version for some reason requests permission.
Simple solution is to create the app in the developers area, do all the settings to an iframe and create the application path to your website. Now in your website remove all the PHP code related to FACEBOOK GRAPH API and let it be a simple website that is independent of facebook. This will make what you want.

Categories