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