w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
How do I get .htaccess to redirect from wildcard subdomain page to wildcard subdomain folder
Add this to the htaccess file in your document root(s): RedirectMatch 301 ^/([^/]+).php$ /$1/ You'll most likely need that trailing slash because if it's redirecting you to a directory, mod_dir will redirect again in order to add the trailing slash. EDIT: To exclude, you'll have to use mod_rewrite: RewriteEngine On RewriteCond %{REQUEST_URI} !index.php RewriteRule ^/?([^/]+).php$ /$1/ [L,R=301]

Categories : PHP

Facebook 'like' button doesn't show when linking to my Facebook page - it works for every other page
Ok. I feel like an idiot. After about a month of thinking, I was having a shower this morning and I finally figured out the problem. This Facebook page is not available to people in Thailand. I live in Thailand.

Categories : Facebook

Facebook oauth for accounts with managed page not switching (using Facebook as your page)
I'm having the same issue :( I haven't come across a solution.. except maybe to create a landing page on facebook canvas. This will prompt them to switch from "Page" to "Personal" before going through your application setup.

Categories : Facebook

Map a page to a subdomain in wordpress
[R] will always at this way. [R=301,L] means redirect to a permanent new location. Try Using reverse proxy RewriteCond %{HTTP_HOST} mypage.mysite.com RewriteRule ^(.*)$ http://mysite.com/mypage$1 [P]

Categories : Wordpress

.htaccess help - need to rediect from incoming subdomain to new page
Enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory: Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteCond %{HTTP_HOST} ^xxx.xxx.com$ [NC] RewriteRule ^(.*)$ http://www.xxx.com/xxx/xxx/$1 [R=301,L]

Categories : Htaccess

callback issue in Facebook while user clicks anywhere while Facebook login page is loading
Goto onCreate() method of WebDialog.java in FacebookSDK library, you will find following statement: spinner = new ProgressDialog(getContext()); add the below statement after it spinner.setCanceledOnTouchOutside(false); you are ready to go!

Categories : Android

Facebook like buttonto like a particular wall post (photo, video, link, etc) of my facebook page?
The middle response of Facebook Video Like Button Help? seems to indicate Facebook will automatically embed a like button into the video you upload to them (rather than linking to an external video). Also this article seems to confirm it: http://yourinternetbusinesslink.com/facebook-like-button-video/

Categories : Facebook

Facebook Graph API & django-facebook - posting links and photos to page feeds
Facebook Graph API PHP SDK posting on page as page Found it. There is a different access token for impersonating the page to post as the page. You get that from /me/accounts and use that token to post as the page. Updated working code: @facebook_required_lazy(scope=['manage_pages', 'publish_stream', 'photo_upload']) def index(request): if request.method == 'POST': form = CPYPosterForm(request.POST) if form.is_valid(): fb = require_persistent_graph(request) msg = form.cleaned_data['msg'] pages = form.cleaned_data['pages'] me_accounts = fb.get('/me/accounts') access_token = None resp = dict() for p in pages: for d in me_accounts['data']: if d['id']

Categories : Django

How to render a page on a WordPress website for a subdomain using htaccess
Try this: RewriteCond %{HTTP_HOST} !^(www). [NC] RewriteCond %{HTTP_HOST} ^(.*).example.com [NC] RewriteRule (.*) http://www.example.com/countries/%1/$1 [L] It will also redirect india.example.com/test.html to www.example.com/india/test.html

Categories : PHP

Facebook Graph API, Development of Facebook page post targeting( make visible only specified country/city )
Try feed_targeting instead of targeting! All parameters which you can target like languages,cities,counties are facebook specific. You can resolve them via autocomplete data : "{'locales':[1001],'countries':[GE],'cities':[825886]}" Nice feature for automatic posting with targeting but so bad documented in the Facebook documentation...

Categories : PHP

Facebook page link open in facebook app instead of safari browser
make it this way if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString: @"fb://profile/<page id>"]]){ [[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"fb://profile/<page id>"]]; }else{ [[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://www.facebook.com/<page name>"]]; }

Categories : Iphone

Is there a drupal module for importing Facebook Events from a Facebook Page?
As per my knowledge, there is no such module available in Drupal as of now. But you can write a custom module for the same using following facebook graph api: https://graph.facebook.com/PAGE_ID/events You need a valid access token to return the events list for a page. Visit https://developers.facebook.com/tools/explorer to test it.

Categories : Facebook

Remove Subdomain from URL string , keeping the rest of URL (for replacing subdomain)
You can split the domain as: $url = "city1.domain.com.uk/index.php?page=category/238/12"; list($subDomain, $params) = explode('?', $url); list($domain, $sub) = explode('/', $subDomain); $newUrl = $sub . "?" . $params; echo $newUrl; Cheers!

Categories : PHP

Post dialog on Facebook wall and Facebook page
Yes. After your above post is completed, you can simply make another call to publish on the fan page . Just like: FB.api("/pageid/feed", params); Just like this: function callback(response) { var obj = <YOUR_PARAMETERS>; if (response && response.post_id) { alert(response.post_id); FB.api("/<YOU_PAGE_ID>/feed", 'post', obj, function(response) { if (!response || response.error) { alert('Error occured'); } else { alert('Post ID: ' + response.id); } }); } } Permissions required: manage_pages, publish_stream

Categories : PHP

Obtaining Facebook Page Access Token in Facebook iOS SDK 3.5.x
Well, this is SDK 4.x, but here's what I've gotten to get it to work __block NSString *pageToken; FBSDKGraphRequest *newRequest = [[FBSDKGraphRequest alloc] initWithGraphPath:[NSString stringWithFormat:@"/%@/accounts", [FBSDKAccessToken currentAccessToken].userID] parameters:nil HTTPMethod:@"GET"]; [newRequest startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { if (error) { NSLog([error localizedDescription]); }else{ //here you made need to do some debugging. not sure how it works with multiple pages pageToken = [[[result objectForKey:@"data"] objectAtIndex:0] objectForKey:@"access_token"]; }]; Again, not entirely sure how it works when a user

Categories : Misc

How Do I Create Facebook Tab on My Fan Page that links to a facebook group
You can add some Javascript redirect on the tab page itself. <script language="javascript"> top.location.href = "https://www.facebook.com/groups/bettyrockyourlife/" </script> Also, sometimes it's best from a UX standpoint to tell the user what is going on. Like setting a timer of a few seconds on the JS and placing a message on the page telling the user that the page will be redirecting elsewhere.

Categories : Facebook

Can i get facebook checkins of my facebook page with realtime updates api?
There seems to be a documentation bug in the FB docs. Instead of enabling 'checkins' for the subscription, you must enable 'feed'. Then user checkins will appear at your callback url as changed_fields=feed Then you can read the user's feed and match the timestamp in the RTU and/or look for status updates with a location/place.

Categories : Facebook

Post a link to wall of Facebook Page using Facebook sdk 3.1
This guide shows you how to get started developing with the Facebook SDK for Android. https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/ Complete samples HelloFacebookSample: an all-round sample that demonstrates profile access, status updates and photo uploading Scrumptious: demonstrates the use of login, requests, pickers, picture uploads, and Open Graph publishing

Categories : Android

Why am I getting an apache server error page on a django vhost using underscore in my subdomain?
Firstly, ALLOWED_HOSTS should be ignored altogether when you have DEBUG=True so that's strange that you are getting validation errors. I was having an issue similar to this with nginx where I had an underscore in my host name which meant Django didn't validate it. This might be an issue particularly if you are having Apache rewriting your host header (this was the case for me as nginx was reverse proxying) or your subdomain includes an _. You can see how Django validates hostnames in the source, furthermore, I wrote a quick blog post on this also which might help

Categories : Django

Showing a GitHub project page only under custom subdomain, never via folder path
The only solution that I am aware of is hiding http://domain.tld/projectname/ content with a robots.txt file on the web server that serves that domain. http://en.wikipedia.org/wiki/Robots_exclusion_standard

Categories : Github

Google Analytics merging domain & subdomain index page info
You should be able to add a secondary dimension of "Hostname" to your content reports to break out the subdomain. Then you can apply an advanced filter to the report to only show results where Hostname contains the subdomain you care about. Then, you can choose the Navigation Summary view to see the next page paths.

Categories : Google Analytics

Facebook Canvas URL redirection to 404 Page of Facebook
The Canvas URL can't be : https://apps.facebook.com/272901126185053/ It should the URL to the app where it is hosted. The link you mentioned is the canvas page.

Categories : Facebook

Invoking Facebook app on iOS to a specific Facebook page
This link fb://profile/135057709986569 would open my Facebook page on iOS if the Facebook app is installed. Just replace the number with your Facebook ID. (Find it by going to your page admin menu and looking at the url). Next you can open it via code like this: NSURL *myURL = [NSURL URLWithString:@"fb://profile/135057709986569"]; [[UIApplication sharedApplication] openURL:myURL]; See https://developer.apple.com/library/IOs/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW18 This wiki shows you a huge list of possible facebook app links: http://wiki.akosma.com/IPhone_URL_Schemes#Facebook

Categories : Iphone

Programmatically like a facebook fan page in Facebook android SDK
To like a post on facebook, I use this part of code to create the request. Request likeRequest = new Request(Session.getActiveSession(), pageid + "/likes", null, HttpMethod.POST, new Request.Callback() { @Override public void onCompleted(Response response) { } }); Where I already logged in to Facebook, so I can just call the Session.getActiveSession(). Then I execute the request with: Request.executeBatchAndWait(likeRequest); You should run this in an Asynctask, since you are not allowed to do network stuff on your main thread.

Categories : Android

How to Facebook page id using Facebook sdk3.1 for Android
To retrieve the list of the pages you can query the following end point /me/accounts This end point along with manage_pages permission will give you the list of the pages the User administers and you can use the same along with the Page's access_token provided with each to post on the corresponding pages.

Categories : Android

forced https on subdomain .htaccess file is sending wordpress admin page to parent domain
Place the following in the .htaccess for the domain # .htaccess WildCard SSL + wordpress + subdomain RewriteEngine on RewriteCond %{HTTP_HOST} ^shop.domain.com$ RewriteCond %{REQUEST_URI} !^/shop/ RewriteRule ^(.*)$ /shop/$1 RewriteCond %{HTTP_HOST} ^shop.domain.com$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(/)?$ shop/index.php [L] # BEGIN WordPress for main domain <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ RewriteRule ^index.php$ - [L] RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress

Categories : Wordpress

Using graph api to bulk upload to facebook company page (not a user page)
Your link doesn't appear to go anywhere useful, I'm afraid. Nonetheless, I'm guessing your problem here is that you need to use a Page access token not a user access token to publish to a page rather than a user feed. See the section on Page Access Tokens at https://developers.facebook.com/docs/reference/api/page/

Categories : PHP

Getting a manage page access token to upload events to a facebook page
If you are extending the user access token then the page token received will not have an expiry date. So then the user will only have to login once in the entire usage of the app. Exchange the short-lived user access token for a long-lived access token using the endpoint and steps explained earlier. By using a long-lived user access token, querying the [User ID]/accounts endpoint will now provide page access tokens that do not expire for pages that a user manages. This will also apply when querying with a non-expiring user access token obtained through the deprecated offline_access permission. https://developers.facebook.com/roadmap/offline-access-removal/

Categories : Facebook

Facebook API: Error "(#210) Subject must be a page" when posting a Status Update on a Page
I found the solution: In the field next to POST I only did enter the Page-ID (like 123456789012345) but you must add "/feed" to the end, like this: 123456789012345/feed The documentation does not say how to post a status message. To me it was clear, If want to post something on a page, I have to enter the pages ID, not more. And if the error-message would have said "Subject must be a FEED" everything would have been clear. But is said "must be a PAGE" but it already was a page.

Categories : Facebook

Facebook SDK to manage facebook page
No, you'll need to create a Facebook App. Doing so creates an App ID which allows you to further extend your possibilities (images, timeline, etc...) The SDK will not function properly unless you are utilizing a proper (unique) Facebook App ID.

Categories : Facebook

Can't submit anything to facebook page from facebook app
Ok I solved the problem. Maybe it can be helpful for others. I don't know for what reason are those permissions https://developers.facebook.com/apps/[APP_ID]/permissions but the only thing I had to do was going to https://developers.facebook.com/tools/explorer/ and changing application from Graph API Explorer to my app and generating new access_token for privilages I needed. I don't know why they moved such crucial thing as permissions to the testing tool.

Categories : Javascript

Share multiple videos on one page onto facebook page wall
To do this, you need to get the access token from the user accounts, and not from the FB.Login. string getPagesTokensUrl = string.Format(@"https://graph.facebook.com/me/accounts?access_token={0}",accessToken); using (WebClient wc = new WebClient()) { var pagesTokens = wc.DownloadString(getPagesTokensUrl); JObject o = JObject.Parse(pagesTokens); for (int i = 0; i < o["data"].Count(); i++) { if (o["data"][i]["id"].ToString() == ConfigurationManager.AppSettings["YOUR PAGE ID"]) { return o["data"][i]["access_token"].ToString(); } } }

Categories : Facebook

How can I post links, pictures etc to my facebook page on behalf of my page using an app?
in your code you only get USER access token. However, in order to post as page, you need to get PAGE access token. See here for more details: https://developers.facebook.com/docs/authentication/pages/ In 2 words, you need to do the following: Authenticate the user and request the manage_pages permission Get the list of pages the user manages using token from (1) - https://graph.facebook.com/me/accounts?access_token=USER_ACCESS_TOKEN Parse the list and get the PAGE token - and use it to post to the feed. Basically, before your client.Post("/AllTheMed/feed", ...) you should call me/accounts (here comes pseudocode): var myAccounts = client.Get("/me/accounts"); var pageAccessToken = myAccounts.Single(x => x.pageName == MY_PAGE_NAME).access_token; var pageClient = new FacebookClie

Categories : C#

Subdomain forward to another subdomain without redirecting
Since the two domains ("test" and "m.test") have different document roots, you're going to need to reverse proxy. The problem here is mod_proxy, the proxy module, may not be loaded by your host, but you'd do something like this: RewriteEngine On RewriteCond %{HTTP_HOST} ^m.test.example.com$ [NC] RewriteRule ^(.*)$ http://test.example.com/$1 [L,P] These rules would be in the /m.test/ folder, the document root of the m.test.example.com subdomain. The P flag tells mod_rewrite to hand the request to mod_proxy to reverse proxy instead of redirecting the browser.

Categories : Apache

Posting to Facebook Page through API as the page (with admin rights)
Well, definitely the gem you are looking is Koala. Update: As it seems, you are having some problem setting the actual configuration of Koala gem. Let's go through every step. You need to setup a new Koala::Facebook::API. Despite of being a horrible name, this is really the connection to your profile user. To set up this you need to access the Facebook Explorer and click Get Access Token button (make sure you are logged with the account you wanna post message's to). just copy that access token. @user = Koala::Facebook::API.new(access_token) Use that access_token to set this new @user. Now whenever you mention "me" in any Graph API request on a @user, you'll be mentioning this user (@user) as the target for that request. "me" is just the facebook ID for the user itself. The final ste

Categories : Ruby On Rails

Post link to Facebook page as page admin
You need to use a Page access token if you want the post to appear 'as the page' - if you use your user access token the behaviour depends on some settings in the page management interface of Facebook and may or may not post as the page depending on those settings.

Categories : C#

Can I post in facebook user wall and facebook fan page automatically when user is not active?
If a user authorized your app once, you can get the long-lived token (expiry: 60 days), and then use this to do actions on the user's behalf at any later time (till the token is expired- you'll have to refresh the token in that case) Here's how you can exchange the normal access token with the long-lived token: Expiration and Extending Tokens And to refresh the long-lived token, you have to repeat the same procedure again, by logging-in the user to your app again.

Categories : Facebook

Creating a subdomain Auth cookie then redirecting to subdomain loses the cookie in asp.net MVC4
I have good news and bad news. The bad news is-- you can't do it. See here for an explanation. Essentially your server is setting a cookie for a domain it does not contain, so the cookie is rejected. The good news is-- you don't want to do this anyway. Your design violates OWASP 2013 A4 (unsecure and unvalidated direct object reference). In this case you are storing user's access permissions as the domain of the cookie, which a hacker can easily modify. Find a different way to designate subdomain access. There are all kinds of ways to do this. Here is one way that is pretty close to your plan: Store the subdomain in the cookie value itself. Create a secure document container that lists the subdomains to which the user is granted access. You could for example store the subdomain

Categories : Asp Net

Is there any way facebook page access token of by page id?
I'm guessing you don't want to be admin of your clients' pages: You could create a page so that your clients login to Facebook and grant permissions to your app. Then you can get the page access token and save it in your DB. Finally use that access token to post directly to each page as admin without being you the actual admin. Quoting Facebook documentation: To obtain a page access token you need to start by obtaining a user access token and asking for the manage_pages permission. Once you have the user access token you then get the page access token via the Graph API. To get user access token (supposing you are logged in to fbk and have granted permissions to your App): $user = $facebook->getUser(); if(!$user) { $login_url_params = array(

Categories : Facebook

Auto post facebook fan page with fan page name PHP SDK 3.2.2
Just put you token here: https://graph.facebook.com/me/accounts?access_token=token Then you will find the access token for posting as a page. Hope that helps.

Categories : Facebook



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.