Define URL from a web server on iphone - iphone

I am working on an iphone app. now i am messed up with a issue. I want to link a file download path URL with a button, so when user click that button, it downloads file from URL at back. Problem is that URL changes so frequently for which i am thinking of doing such that first it seeks for URL online & then downloads. Can anyone help me with that ? So that i just change URL online anytime behind the back of that button in App. If i make static URL at the back of that button, its not gonna work because client says that URL changes almost every 4 days.
Thanks in advance for help.
Example:
just as 2 days ago, URL was : tv.cinstedac.com/iphone/stream.m3u8
but now URL is tv.cinstedac.com/iphone/stream1.m3u8
All i want is to do such that when a person click on that button it downloads file at url, but what will be solution of changing URL ? So that i change it online & it gets updated on App as well !

the easyest way is to have a static url to a webserver that will return the proper url i suppose. But your question is not 100% clear as of where this url could be found.
EDIT
Your edit confirmed my guess, you will need to have a page that is always at the same adress (for example tv.cinstedac.com/iphone/giveStreamUrl.php). which will give only one line of output:
tv.cinstedac.com/iphone/stream1.m3u8
you could get this url from a database for example. If you want example code i will need some more info about where you will get this url from (database, txt file, etc).

Related

TWA bases app sometime showing URL and sometime working, even Assetlink.json uploaded properly

I have website (https://www.kriscent.com/product/kart-supermarket/). I created PWA of that after that I uploaded it on Play store by using TWA(Trusted Web Activities), App URL is https://play.google.com/store/apps/details?id=in.kriscent.kartlite.
The URL of website always show in app, So I uploaded the assetlink.json (URL: https://www.kriscent.com/.well-known/assetlinks.json).
After uploading the assetlinks.json, When I run my app, the website URL disappeared but when I switched on other link in the app then the URL shows again.
I don,t know what is happening. Please help me if anybody has idea to resolve this issue.
enter image description here
enter image description here
The problem is that, when navigating to a product detail page, you are using a different origin than the one used to open the Trusted Web Activity and that doesn't have Digital Asset Links setup:
When the application is started, it opens https://www.kriscent.com/, which is correctly validated.
When clicking on a product, the user is take to https://kriscent.com/ (without www), which is a different origin, and is not validated in the Android app.
It is possible to get the Trusted Web Activity to work with multiple origins but, in this case, I'd recommend using a single origin for the initial URL and the navigations, as you will be able to take advantage of using the same service worker, browser storage, etc.

Where must I upload my .unity3d

Ok the problem is when I try to put my "Unity Binary URL" to facebook's developers web page, it shows me an error message saying that my url must ends with .unity3d...
I try to upload it to... MEGA, Drive, OneDrive, DropBox and all of them give me a encripted url like this:
.../open?id=0B9ZOtq4g8KlZNXc5cndQcEY1RVE&authuser=0
(this project is already shared in public)
My Question is... where or how must I upload this file for get the correct url?
I mean .../myfolder/myfile.unity3d ???
for Google Drive youll get a link like this when you hit the share button and make sure its the share link to the WebPlayer folder
https://drive.google.com/folderview?id=0B8mGQfidoAhjeFFiWC1r97s1SlE&usp=sharing
so the real key to this is after the id= part this
0B8mGQfidoAhjeFFiWC1r97s1SlE
you take that key and put it into facebook like this
https://googledrive.com/host/0B8mGQfidoAhjeFFiWC1r97s1SlE/WebPlayer.unity3d

YOURLS - Not Redirecting to correct original URL after updating it

I installed YOURLS yesterday and it's amazing. There is one little quirk I can't seem to figure out. When I create a short URL but later change the original URL (where the short URL points to) it doesn't cause your browser to redirect to the new original URL if you previously clicked on the short URL before the update.
Example:
Create a brand new short URL with the destination cnn.com
Test the short URL - it will go to cnn.com
Change the original URL on the same short URL to now point to cnet.com
Click on the same short URL again, and it still went to cnn.com
Now, if I go into incognito mode or a different browser to go to that short URL after changing it, it works fine. It's almost as if the user's browser "saves" where the initial link goes and doesn't check to see if the short URL has changed its destination.
Is there a way to always have a web browser that has previously clicked on the link to always check the orignal URL in case it has changed?
Thank you!
Dan
Simple, clear your browser cookies.
Of course the browser saves the data - that's what they're supposed to do.
You need to set the expiration times on... well, everything.

App name showing incorrectly on the ticker

We have an old name for the app and we want the app to show the correct name on the ticker but we have not been able to do it (it is still showing the old name). We updated the title of the url canvas and submitted it on the debugger and interestingly enough, the title is taken correctly on the https address (it is shown on the debugger page but not in the ticker) but not on the http url. Actually it says for the http that the app has problems with the meta tags. Any idea on how to fix this problem? Thanks a Lot, Gilmer
Go to http://developers.facebook.com/tools/debug
Enter your url in that and try to generate all the information.
If that is not showing any errors in that, then scroll down at the end of the page.
You will find block named as "URLs"
Click on the first link named as: "Graph API:".
This will solve your issue.
In future, if you are going to change any content from your page, then don't forget to do the same process once again.
Thanks!

Facebook iframe tab signed request always empty

I'm working on a Facebook app tab and would like to use the signed request bundle as documented here:
http://developers.facebook.com/blog/post/462/
I'm trying to use their example code to unpackage the signed request which is supposedly passed to the tab, however, $_POST, $_GET, and $_REQUEST are always all empty.
The exact code works on the canvas page and I am able to parse the signed request.
Is there something that I'm missing in their recent announcement?
By the way, the app is not published to the marketplace, and the fanpage my tab is installed on is private. Will that make a difference?
-Seth
Okay, figured it out!
When configuring the app, I had filled in the "Tab URL" to be "tab/"
This made the full url to the tab page "http://www.example.com/myfacebookapp/tab/"
This made sense to me.
Apparently, Facebook doesn't like this. After changing my "Tab URL" to 'tab/index.php", the signed request started to show up in the app tab!
Essentially, the problem is that your webserver is performing a redirect when it receives the request. In your case, it's redirecting from http://www.example.com/myfacebookapp/tab/ to http://www.example.com/myfacebookapp/tab/index.php; in my case it was redirecting from http://www.example.com/myfacebookapp/tab to http://www.example.com/myfacebookapp/tab/ (my app is built in .Net MVC, so has no filenames, but needs that trailing slash, apparently).
So the canonical solution is to make sure that the path in the Tab URL field is the actual URL, not one that the webserver will redirect to. If the webserver has to make a redirect, then the real page is fetched by GET (not POST) and no signed_request postdata is provided to your script.
Very frustrating; I just spend an hour and a half debugging why my test app worked and the production one didn't. To make things worse, I knew this answer, it just didn't register that this was what the problem was. Very irritating!
Thanks Seth I was having the same problem. I could get a signed request on the app canvas page but not of my page tab. For clarification
go to www.facebook.com/developers/
click on edit settings for your app
click the Facebook Integration tab
at the bottom in the Page Tabs section in the Tab URL field enter in the path to the index.php page for your facebook landing page
ex. if your page is located at www.foobar.com/facebook/tab/index.php you need to put "tab/index.php" (without the quotes) rather than just "tab/"
Been trying to figure this out for days!
I found a solution:
Just put a "/" at the end of the tab url.
Like: "http://domain.us/facebook/tab/"
It worked for me, let us know if it also works for you!
Once you are Authenticate with Application you will get the signed_request data,
Authenticated as like in the below URLs
https://developers.facebook.com/docs/authentication/
https://developers.facebook.com/docs/reference/javascript/FB.login/