Can I use Pixabay API in My Wallpaper App? - api

I recently created a wallpaper app.
I want to ask, do Pixabay allow to show their photos as wallpaper in a Wallpaper Application. Isn't there any policy restrictions for wallpaper apps in Pixabay.
Website:
pixabay.com

Yes you can.
The PHP library I tested is from Zoonman PHP API Code on GitHub
Then obtain a Developer Account on Pixabay Developer API
There after install the library on your server and obtaining images URLs etc is just simple like this code asking for images on 'nature'. Change the query keyword and you will get images for that.
<?php
require_once 'vendor/autoload.php';
$pixabayClient = new \Pixabay\PixabayClient([
'key' => 'yourPixabayKey'
]);
// test it
$results = $pixabayClient->get(['q' => 'nature'], true);
// show the results
var_dump($results);
Use data fields returned by the API to create your wallpaper App gallery.

Related

Office 365 JavaScript API, redirect back to WP app after launching Store

I am creating a Windows Phone app using HTML And JavaScript. I am able to add connected services and have selected "Users and Groups" and given it Read permissions.
I am then making the following calls on button click:
var authContext = new O365Auth.Context();
authContext.getIdToken("https://TestDomain.onmicrosoft.com/TestWebApi").then(
function (token){
}
);
Services/Office365/Settings.js has been edited to the following:
Settings.clientId = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
Settings.authUri = "https://login.windows.net/common/";
Settings.redirectUri = "ms-app://s-1-15-2-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx/";
I got the redirectUri value by calling the following function:
Windows.Security.Authentication.Web.WebAuthenticationBroker.getCurrentApplicationCallbackUri();
I do get the login screen for my organization and I am able to provide credentials and it tries to redirect it back to my application, but then I get asked the following question:
"You need to install an app for this task. Would you like to search for one in the Store?"
If I click on yes, it takes me to the store and says "No apps found". If I click on no, it doesn't do anything.
How could I possibly get it redirected back to my app?
The connected services experience only works in Multi-device hybrid apps (a.k.a. Cordova), not in Windows Phone apps.

How to QuickBlox cloudcode?

How I make custom cloudcode on QuickBlox ?
I found https://github.com/soulfly/QuickBlox-cloudcode but how can I pass parameters to cloud ?
QuickBlox doesn't provide an ability to upload custom code to the cloud.
It's just my temporary workaround how to do it, but it's now finished yet.
Here is how it can work:
1) Use QuickBlox Web SDK to write some code on javascript http://quickblox.com/developers/Web .
Here is an example of simple script which creates session, get custom objects and return to user https://github.com/soulfly/QuickBlox-cloudcode/blob/master/Web/qb_cloudcode_demo.html
2) Upload this file to QuickBlox Content module, use Admin panel
3) Use public url of this file and load it in mobile app in WebView. It will perform all your custom code and render result. You just need to extract this final result and use in application.
That's all, I will try to finalise it soon, but you also can do it

equivalent to android's share intent concept for iPhone using titanium?

I want to add share content functionality in my iOS app. I am developing an app in titanium for iPhone. I want to add a share button that when a user clicks will open a dialog box contains many different option like Facebook, twitter, email , and print.
Unless this has been included in the Appcelerator Framework, you are going to have to write a module
"Share Screen" iOS 6
There is a module for this that wraps the Social.framework on iOS. Ive used it in my own apps and its quite nice. Find it here.
And a small example of how to make it work.
var Social = require('com.0x82.social');
Social.showActivityItems({
activityItems : ["http://stackoverflow.com"]
});
Social.addEventListener('activityWindowClosed', function(e) {
if (e.completed) {
alert('Shared successfully');
}
});

Using FBGraph with Rails 3 Problems posting to my own page on facebook

Following on from this post Where do I get an access token from to post to my facebook page using FBGraph gem in Rails 3? I am now able to make posts to my own facebook page but the posts are not visible to anyone other than me
I have all the privileges and I have an off line token. My facebook app settings for my account are set to public for my app.
Using the following code I can make posts, it's just that they are not isible to anyone.
How do I sort this out? Is it some approval process or app setting I have to make or is it down to my code? Totally stumped!
My code
def send_fb_message(params = {})
owner = FbGraph::User.me(FB_TOKEN)
pages = owner.accounts
page = pages.detect do |page|
page.identifier == FB_PAGE_ID
end
page.feed!(
:message => params[:message],
:description => params[:description],
:link => params[:link]
)
end
My FB_TOKEN constant is an offline access token supposedly for the user me, the FB_PAGE_ID constant is the id of the page I wish to post to.
I am using the Rails console to call the above method on my dev machine. Not sure if the location of the request makes a difference?
What am I missing?
Thanks in advance
Do you have the sandbox mode enabled in the advanced app settings?

Swap the application in Objective-C?

I'm developing iPad application I need to integrate third party project(Source code) with my code like i have a button in my code, when i click on the button it landed to third party application page then navigate around and vice verrsa. what is the best way to swap the app?
Regards,
Sri
Use the url schema.
See add custom URL Schema using http://
Every Application can have customer url schemas. Like ...
yourapp://someting?withparams=1.
To get they running you have to change your Info.plist to inform the iOS that your app is handling that url schema. See the SO post above.
When another App calls that URL your app gets opened and you get a hook on your app delegate.
check http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007899
and:
http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intf/UIApplicationDelegate
Also look here:
http://wiki.akosma.com/IPhone_URL_Schemes