Affichage des articles dont le libellé est Active questions tagged facebook - Stack Overflow. Afficher tous les articles
Affichage des articles dont le libellé est Active questions tagged facebook - Stack Overflow. Afficher tous les articles

lundi 20 avril 2015

Embed Youtube Video To Facebook And Play At Specific Timecode

I have a :30 YouTube video that I want to embed onto Facebook and start playback at :16.

I thought this would be easy enough changing the parameters in the URL for share, or the URL in the embed code. But when I post this on Facebook, even though the URL's will link to YouTube and play at the correct :16 mark, they always start from :00 when playback is initiated inside Facebook.

Does Facebook strip all of the URL parameters for embeded YouTube videos? Is there a work-around?

I've tried:

http://ift.tt/1OxCAsj

And I've tried:

<iframe width="560" height="315" src="http://ift.tt/1OxCAsj" frameborder="0" allowfullscreen></iframe>

And I've tried:

<iframe width="560" height="315" src="http://ift.tt/1OxCAsl" frameborder="0" allowfullscreen></iframe>

Nothing seems to work. I have an idea that depends on this functionality, so I'd love some help if anyone knows a work-around or even a reason. Thanks so much, crew!

Facebook webview Login issue android

I have an issue: I provided the feature of login with facebook through my app via facebook sdk 4.0.1.

At first I use below method to login and provide read permissions in mPermissions array.

LoginManager.getInstance().logInWithReadPermissions(FacebookFragment.this, mPermissions );

But if user already provided these permission once, then after re-login facebook says "You have already authorized myapp" and show me attached screen UI.

This scenario generates only when user do login with facebook webview (facebook app is not installed in their device) Please let me know about how can I remove this page from login.

enter image description here

Unable to fetch profile pic using graph api Facebook sdk 4.0

I am unable to fetch image using

 Bitmap bitmap = getBitmapFromURL("http://ift.tt/1Dm7y3w");
            if(bitmap!=null)
            imageView.setImageBitmap(bitmap);
            else
                Toast.makeText(getActivity(),"null it is",Toast.LENGTH_SHORT).show();

Where getBitmapFromURL is

public static Bitmap getBitmapFromURL(String src) {
        try {
            URL url = new URL(src);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            connection.setDoInput(true);
            connection.connect();
            InputStream input = connection.getInputStream();
            Bitmap myBitmap = BitmapFactory.decodeStream(input);
            return myBitmap;
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
    }

But when I use below everything works fine

        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
        StrictMode.setThreadPolicy(policy);

But I have read there Strict mode in android 2.2 that this policy is not safe to use and not just this, it is also blocking my main UI for few seconds.

I want to know first, why I am unable to fetch facebook profile pic without using above policy and Is there any way that I can avoid above policy and may able to fetch my profile pic? Thanks in advance :)

Facebook connect and phonegap

i'm making a phonegap web application and i need to put Facebook's login in it.

i was not able to install phonegap's Facebook login but i find this very interesting library http://ift.tt/PSB2l0 i installed and it works fine on my iphone with phonegap desktop app (by using phonegap localhost as Valid OAuth redirect URIs in Facebook for example: http://localhost:3000/pathto/index.html) but when i open my local project from file://pathto/index.html it doesn't works, the redirect uri is invalid.

1- is there a way to allow all redirect uri? 2- when i build the app with build.phonegap and make the iphone/android app it will work with this redirect uri? if not? what is the redirect uri that i should put?

dimanche 19 avril 2015

How to limit the number of nodes?(Spritekit)

Hey guys i have a little problem check it out:



override func touchesBegan(touches: Set, withEvent event: UIEvent) {

for touch in (touches as! Set<UITouch>) {

var Location:CGPoint = touch.locationInNode(self)
var Node:SKNode = self.nodeAtPoint(Location)

if(Location.x < self.size.width/2) {

node2.addchild(sprite2)
node1.removeFromParent()
}
if (Location.x > self.size.width/2) {

node1.addchild(sprite1)

node2.removeFromParent()
}


The problem is that when i tap for exmple 10 times on the same side of the screen (lets say the right side) it apppears 10 spritenodes and i can t use "hidden" because of the physicsBody can you guys help me?


facebook number of page views using facebook graph api

I'm using this url for facebook graph api to get page views, and get the following in return:



{
"data": [],
"paging": {
"previous": "http://ift.tt/1IgTnxW",
"next": "http://ift.tt/1IgToli"
}
}


in some queries date time error that must be unix or date time format. I can share you my access token. I urgently need number of page views and also tell me since and until format


Not able to boost my blog in facebook page

I am trying to post Blog on my Facebook page and boost it, but its shows error message saying - specified creative could not be downloaded. enter image description here


Comment using yahoo in Facebook comment plugin

The comment disappears if one clicks on the "comment using" > Yahoo or Hotmail.


how to enable third party commenting ?


how to get similar pages by category and their likes using facebook graph api

i am using this link in facebook grap explorer and it works


http://ift.tt/1HK5N36


but i am trying to access the same data in the given below code without giving id because id gives an error of non existing feilds



function Getpage()
{
FB.api("/search?q=education?education&type=page", function (response) {

});

}


it does not work but same if i try acessing in that way it gives takes http/graph/facebook/ as id



function Getpage()
{
FB.api(" /http://ift.tt/1HK5N36", function (response) {
var i = 25;
var g = response.data[i];
});

}


it doesnot return the same data as in graph explorer the above link returns i tried acess token even but using javascript how should i get similar pages of same category? like this the first link returns in graph explorer



{
"data": [
{
"category": "Education",
"name": "EducationUSA",
"id": "72457958318"
},
{
"category": "Education",
"category_list": [
{
"id": "108051929285833",
"name": "College & University"
},
{
"id": "163917800330437",
"name": "Admissions Training"
},
{
"id": "181053558607965",
"name": "Youth Organization"
}
],
"name": "Education Diffusion",
"id": "180364528818411"
},


how to get their likes also?


Facebook Login not working when already authorized

I am trying to implement Login With Facebook using Facebook SDK 3.23.0. Everything is working fine until when user is already authorized Facebook and user is already logged in Facebook Application. When I tap on Log in With Facebook button It's not showing me any dialog if user is already signed in Facebook application as well as already given authorization permission.


I am not able resolve this wearied behavior of Facebook while making login.


items about "would like to post to Facebook for you"

I write a program that says "Program would like to post to Facebook for you" what item should i submit for review? is that "publish_actions"?


but Facebook just say "It looks like you haven't made any API requests to publish content with the publish_actions permission in the last 30 days. You, or any account from Roles, needs to test this app with this permission before you can submit it for review."


Then I add my account to testers and test the program,but nothing changed, why? what should i do?


Message tags on wall post with koala ruby gem

Is it possible to write a wall post tagging users or pages inside the message?


I was told that the following command should work, but it is not



graph = Koala::Facebook::API.new(page_token)
graph.put_wall_post("cool @[PAGE_ID:AnyText] test")

How to control the number of nodes when i tap? Spritekit

Hi guys im new making iOS games (spriteKit) and im making a game where im using two spritenodes (left, right) but is the same hero. The game is about evading obstacles that are comming from two sides so when i tap one of the sides the opposite node should disappear and appears on the right place. The problem is when i tap more than once on the same side of the screen it appears more nodes and i dont want that. Here is the code:



override func touchesBegan(touches: Set, withEvent event: UIEvent) {

for touch in (touches as! Set<UITouch>) {

var Location:CGPoint = touch.locationInNode(self)
var Node:SKNode = self.nodeAtPoint(Location)

if(Location.x < self.size.width/2) {

node2.addchild(sprite2)
node1.removeFromParent()
}
if (Location.x > self.size.width/2) {

node1.addchild(sprite1)

node2.removeFromParent()
}

Open URLs in Native FB App

I've been reading on deep linking and App Links and such.


I was just wondering if it was possible on Android to simply share a URL of a Facebook Profile or Album on say WhatsApp or Telegram and get it to open in the native FB app instead of in the browser.


If not possible, why is this so?


Facebook open graph link

Is there a way to define the facebook Open Graph meta tags (OG) with a link?


For example I have a single page website with several anchors.


At each anchor I have a sub heading and an image


The url would be : http://ift.tt/1GLjCz9


When using the facebook share function I'd like to define that URL with a defined sub heading as the title, and the the image in the sub heading as the image that is shared on facebook.


Is this possible? Is it possible with PHP or JS?


Facebook Completion Handler returning null?

I am using the Facebook API and I am using the FBRequestConnection.startForMeWithCompletionHandler method to get a user's profile picture. This was working fine for me until recently where suddenly my application constantly fails because the id parameter returns null. I looked up the documentation and it shows the following as the parameters: [FBRequestConnection startForMeWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error)


This is my code so far:



FBRequestConnection.startForMeWithCompletionHandler { (connection, user, error) -> Void in
//Get individual's profile picture
let url = NSURL(string: "http://ift.tt/1GaqSEG")
let urlRequest = NSURLRequest(URL: url!)
//Asynchronous request to display image
NSURLConnection.sendAsynchronousRequest(urlRequest, queue: NSOperationQueue.mainQueue()) { (response:NSURLResponse!, data:NSData!, error:NSError!) -> Void in

// Display the image
let image = UIImage(data: data)
if(image != nil){
completion(result: true, image: self.profilePic.image)
}
}

}


Oddly enough, the user parameter in the function always returns nil and I'm not sure why. I have looked at multiple links on stack overflow and most say that either my session is inactive or I am logged out, but I have tested both and my session is indeed active. Moreover, I looked in my errors array and I got a HTTP 200 Status Code meaning that my connection works. I get two other errors, com.facebook.sdk:ErrorInnerErrorKey and com.facebook.sdk:ErrorSessionKey but upon looking into these errors, I can't find anything about them. Any help would be appreciated. Thanks!


Compile Error using Parse and Facebook

I'm trying to integrate Parse and Facebook's SDK with my app using Xcode 6.3 and am getting these errors when attempting to build:


Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_FBSDKAppEvents", referenced from: __TMaCSo14FBSDKAppEvents in AppDelegate.o "_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from: __TMaCSo24FBSDKApplicationDelegate in AppDelegate.o "_OBJC_CLASS_$_PFAnalytics", referenced from: __TMaCSo11PFAnalytics in AppDelegate.o "_OBJC_CLASS_$_PFFacebookUtils", referenced from: __TMaCSo15PFFacebookUtils in AppDelegate.o "_OBJC_CLASS_$_Parse", referenced from: __TMaCSo5Parse in AppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)


I don't know what this means, but I've tried many other solutions, such as cleaning, deleting the Derived Data folder, checking all of my frameworks, and I still can't solve the problem. If anyone has any idea how to fix this I would be very grateful. Thank you for your time.


Facebook login with passport.js, sails.js API and ember.js

I'm setting up this Sails project where I use PassportJS, via sails-generate-auth, and JWTs - using this as a guide - to login. I'm trying to decouple the api from the Ember app as much as I can so I can use the same API for iOS, etc. Since passport uses callbacks to handle Facebook auth, how can I login via AJAX?


I'm able to successfully login to Facebook via passport js using an AJAX GET to /auth/facebook like so



var url = config.api + '/auth/facebook'
var controller = this;
Ember.$.get( url, function ( data ) {
// This is never called because Facebook redirects
localStorage.private_token = data.token;
controller.transitionToRoute('profile', data.user);
});


but then when Facebook redirects, it goes back to the API, not the frontend app. But if I configure the backend to redirect to the front end app after the callback, I have a dependency on the front end app that I want to avoid. I've never done Facebook auth before but I've used API tokens for a while now.


Is there any way to do what I'm trying to do? Or should I just redirect to the front-end app from passport.callback?


Django - python-social-auth: Facebook returns anonymous user

I'm using python-social-auth on my Django website to connect with social accounts. I've managed to work with with Twitter and Google, but I'm having problems with Facebook. On the URI callback, request.user gives me 'AnonymousUser'. These are my settings:


settings.py:



...
AUTHENTICATION_BACKENDS = (
'social.backends.open_id.OpenIdAuth',
'social.backends.google.GoogleOpenId',
'social.backends.google.GoogleOAuth2',
'social.backends.google.GoogleOAuth',
'social.backends.twitter.TwitterOAuth',
'social.backends.yahoo.YahooOpenId',
'social.backends.facebook.FacebookOAuth2',
'django.contrib.auth.backends.ModelBackend',
)

SOCIAL_AUTH_FACEBOOK_KEY = 'xxx'
SOCIAL_AUTH_FACEBOOK_SECRET = 'xxx'

SOCIAL_AUTH_PIPELINE = (
'social.pipeline.social_auth.social_details',
'social.pipeline.social_auth.social_uid',
'social.pipeline.social_auth.auth_allowed',
'social.pipeline.social_auth.social_user',
'social.pipeline.user.get_username',
'social.pipeline.social_auth.associate_by_email',
'users.pipeline.require_email',
'social.pipeline.mail.mail_validation',
'social.pipeline.user.create_user',
'social.pipeline.social_auth.associate_user',
'social.pipeline.social_auth.load_extra_data',
'social.pipeline.user.user_details'
)

AUTH_EXTRA_ARGUMENTS = {'redirect_uri': PROJECT_DOMAIN + '/auth/'}

...


urls.py



urlpatterns = patterns('',
...
url(r'^auth/$', views.auth_complete),
...


views.py



...
def auth_complete(request):
return HttpResponse(request.user) # this gives me AnonymousUser
...


Please warn me if I omitted any setting.


Get FB status with UID

I want to get someone's FB status, who is friend of the logged in user. I'm trying curl http://ift.tt/1JkFz5L; isn't this right? I have given all the appropriate permissions.